Methods
-
<static> copyAll( sourceTable, sourceDocumentId, targetTable, targetDocumentId ) → {Array.<string>}
-
<static> getAttachments( table, documentId ) → {Array.<Attachment>}
-
Description
Get all attachment meta for a table and documentId
Parameters
Name Type Description tablestring documentIdsys_id Returns
-
<static> getContent( sysId ) → {string}
-
<static> attach( table, documentId, filename, contentType, base64Content ) → {boolean}
-
Description
Create/Attach a file to an existing record, this will not work with temp tables
Parameters
Name Type Description tablestring documentIdsys_id filenamestring contentTypestring base64Contentstring Base64 encoded data
Returns
-
<static> remove( sysId )
-
Description
Removes an attachment from the system
Parameters
Name Type Description sysIdsys_id -
<static> removeAll( table, document )
-
Description
Remove all attachments for a table and document id (used in clearing temp attachments on the portal)
Parameters
Name Type Description tablestring Table name of the source document
documentsys_id Identifier of the source document
-
<static> update( attachment )
-
Description
Updates the meta for an attachment, as long as its sys_id remains the same and for now we only update the filename
Parameters
Name Type Description attachmentAttachment