FileFormats.save (Method)
Registers a file format with CommonSpot. For example, this could be a graphic image's file type.
Returns:
FileFormatID (integer)
Arguments:
Name | Type | Required | Description |
---|---|---|---|
id | FileFormatID_0 | Required | A file format's ID. If this value is 0, CommonSpot creates a new file format instead of updating one. |
name | PlainText_NonNull_50 | Required | The file format's name. |
extension | PlainText_NonNull_50 | Required | The file format's extension; for example, 'cfm'. |
iconPath | ModulePath | Required | A server-relative URL to an icon representing a page or document's type. |
mimeType | PlainText_NonNull_255 | Required | The MIME type associated with this format. |
category | FileFormatType | Required | The category of file format i.e. Document, Image, Multimedia. |
maxUploadSize | NonNegativeInteger | Optional. Defaults to '0'. | The maximum upload size in bytes. If this value is 0, no limit exists. |
isIndexable | Boolean | Optional. Defaults to '0'. | Boolean flag which when set to true indicates that the file format can be indexed. |
sizeWarningText | PlainText_255 | Optional. Defaults to an empty string. | The text CommonSpot displays if the uploaded file's size is greater than that specified in the 'MaxUploadSize' argument. |
Context:
License Requirements | None |
Permission Requirements | site:SiteAdmin |
Deny Context | None |
Require Context | AuthoringEnabled |
Author Lock |
Error Codes:
Code | Error Message |
---|---|
20001 | The '$1' extension is already set. |
20003 | You cannot provide size warning text if the maximum uploadable file size is not limited. |
20004 | You must provide a size warning text if the maximum uploadable file size is set. |
Notes:
None