Attachment
Method summary
name | description |
---|---|
download | Downloads this attachment. |
getDataUrl | Returns a URL where the attachment data can be downloaded from. |
getDescription | Returns the description of the attachment. |
getEditor | Returns the editor details for the attachment. |
getFilename | Returns the filename for this attachment. |
getId | Returns the unique ID for this attachment. |
getLastModifiedDate | Returns the date/time when the last modification of the attachment data took place. |
getLastModifiedUserId | Returns the ID of the last user to modify the attachment data. |
getSize | Returns the size of the attachment data. |
getTags | Returns the tags applied to this attachment. |
hasEditor | Returns the editor details for the attachment. |
openProperties | Opens the file attachments dialog showing the properties of this attachment. |
Methods
- download ( )
-
Downloads this attachment. Depending on browser settings, this may prompt the user to choose where to save the file, or save it automatically.
detailsExample
examples
Back to Topattachment.download();
- getDataUrl ( ) → {string}
-
Returns a URL where the attachment data can be downloaded from.
detailsReturns:returns tableType Description typestringThe relative path to download the attachment data Example
examples
Back to Topvar url = attachment.getDataUrl();
- getDescription ( ) → {string}
-
Returns the description of the attachment.
detailsReturns:returns tableType Description typestringThe description of the attachment Example
examples
Back to Topvar description = attachment.getDescription();
- getEditor ( editorId ) → {AttachmentEditor}
-
Returns the editor details for the attachment.
Parameters:
paramsName Type Argument Description editorId typeinsight.enums.EditorTypeoptional id of the editor to retrieve detailsThrows:
exceptionsWill throw an error if attachment doesn't have a requested editorReturns:returns tableType Description typeAttachmentEditorAttachment Editor object. Returns editor with the same id as editorId or first editor, when editorId is not specified. Example
examples
Back to Topvar attachmentEditor = attachment.getEditor();
- getFilename ( ) → {string}
-
Returns the filename for this attachment.
detailsReturns:returns tableType Description typestringThe filename for this attachment Example
examples
Back to Topvar filename = attachment.getFilename();
- getId ( ) → {string}
-
Returns the unique ID for this attachment.
detailsReturns:returns tableType Description typestringThe ID representing this attachment Example
examples
Back to Topvar id = attachment.getId();
- getLastModifiedDate ( ) → {Date}
-
Returns the date/time when the last modification of the attachment data took place.
detailsReturns:returns tableType Description typeDateThe last modified time Example
examples
Back to Topvar date = attachment.getLastModifiedDate();
- getLastModifiedUserId ( ) → {string}
-
Returns the ID of the last user to modify the attachment data.
detailsReturns:returns tableType Description typestringThe User ID of the modifying user Example
examples
Back to Topvar userId = attachment.getLastModifiedUserId();
- getSize ( ) → {number}
-
Returns the size of the attachment data.
detailsReturns:returns tableType Description typenumberThe size in bytes of the attachment data in bytes. Example
examples
Back to Topvar size = attachment.getSize();
- getTags ( ) → {Array.<string>}
-
Returns the tags applied to this attachment.
detailsReturns:returns tableType Description typeArray.<string>An array of tag names Example
examples
Back to Topvar tags = attachment.getTags();
- hasEditor ( editorId ) → {boolean}
-
Returns the editor details for the attachment.
Parameters:
paramsName Type Argument Description editorId typeinsight.enums.EditorTypeoptional id of the editor to retrieve detailsReturns:returns tableType Description typebooleanWhen editorId is specified, returns true if attachment has an editor with specified id, otherwise returns false. When editorId is not specified, returns true if there's any editors available, otherwise returns false Example
examples
Back to Topvar hasEditor = attachment.hasEditor();
- openProperties ( propertyName )
-
Opens the file attachments dialog showing the properties of this attachment. If propertyName is provided then the edit mode will be activated for that property of the attachment.
Parameters:
paramsName Type Argument Description propertyName optional the name of a property to edit ('filename', 'description' or 'tags') detailsExample
examples
Back to Topattachment.openProperties('filename');
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.