File

MCM module
File extension
File/Create

Creates a new file.

Authentication:
  • Logged in – You need to be logged in to use this feature
  • CreateUpdateObjects permission – The user has to have the FolderPermission.CreateUpdateObjects permission for the object on which the file is created.
Parameters:
  • objectGuid – The object to which the file should belong
  • parentFileID (optional) – a parent file
  • formatID – the FormatID of the file
  • destinationID – The ID of the destination the file belongs to
  • filename – the filename on the host, see Destination extension
  • originalFilename – the filename
  • folderPath – the folder path on the host, see Destination extension
Returns:

The created file

The FormatID parameter is described in Concepts -> Files.

File/Delete

Deletes a file.

Authentication:
  • Logged in – You need to be logged in to use this feature
  • CreateUpdateObjects permission – The user has to have the FolderPermission.CreateUpdateObjects permission for the object to which the file belongs.
Parameters:

id (unsigned integer) – the ID of the file to be deleted

Returns:

The number of affected rows in the database