Classes

Class FileAPI


Extends ContentObjectAPI, TagContainerAPI.

Defined in: file.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
FileAPI(id, success, error, settings)
Field Summary
Field Attributes Field Name and Description
<static>  
FileAPI.WRITEABLE_PROPS
Writable properties for the folder object.
Method Summary
Method Attributes Method Name and Description
<static>  
FileAPI.binURL()

Retrieve the URL of this file's binary contents.

Class Detail

FileAPI(id, success, error, settings)

Parameters:
{number|string} id
of the file to be loaded
{function(ContentObjectAPI))=} success
Optional success callback that will receive this object as its only argument.
{function(GCNError):boolean=} error
Optional custom error handler.
{object} settings
currently there are no additional settings to be used

Field Detail

FileAPI.WRITEABLE_PROPS

Writable properties for the folder object. Currently the following attributes are writeable: cdate, description, folderId, name. WARNING: changing the folderId might not work as expected.

Method Detail

{string} FileAPI.binURL()

Retrieve the URL of this file's binary contents. You can use this to download the file from the server or to display an image.

WARNING! Never ever store this URL in a page for users to load an image or to provide a download link. You should always refer to published files from the backend. Referencing a file directly using this link will put heavy load on you Gentics Content.Node CMS Server.

Returns:
{string} Source URL of this file.

Documentation generated by JsDoc Toolkit 2.3.2 on Tue Apr 16 2024 17:52:29 GMT-0000 (UTC)