API Reference


Media methods allow you display, create, remove and manipulate media content in Media Factory.
Media.abortMultiPartUpload

This should be used if the multi part upload should be cancelled.

By calling this method, the file will be set to status 5 (Incomplete Upload), and all previously uploaded chunks will be deleted

read more »
Media.addToFavorites

This method adds a media item to the list of a user's favorites and may be called either with an API key having the media.addToFavorites permission or without an API key.

Using an API key with the media.addToFavorites permission a user ID may be provided as the owner of the favorite. Without an API key, the owner of the favorite will be the logged in read more »

Media.deleteFile

Use this method to delete file(s) from the system.

This method removes any cached data for media.getFileInfo ONLY if media.getFileInfo is called with no user ID and returnComments set to false. If media.getFileInfo is called with a user ID or returnComments set to true then stale data may be returned until the cache is refreshed. This will occur automatically after a read more »

Media.getComments

Returns all the comments for a given media file.

read more »
Media.getFiles

Returns a list of media based on provided parameters.

The actual return value is a struct with the totalCount and data properties. totalCount contains the number of items that would have been returned if there was no offset or limit specified.

pageSize has a maximum value of 500 - ie. no more than 500 media items will ever be returned from a single call read more »

Media.getUploadURL

This method provides you with a signed URL that you can then use to upload directly to the Filemobile Amazon bucket where original files are stored, once the upload is complete you must use the media.uploadCompleted method to trigger the system to begin conversion of this file.

The fileData array, must contain type, and filename fields, an example of a valid type would be video/mp4, or read more »

Media.makeHidden

Use this method to make media hidden - ie. only the owner can see it.

This method requires a media ID or an array of IDs.

You must have permission to call this service on media owned by another user (including the public user '1'). Otherwise, you may only make your own media public; you must be logged in to do so. If you do not have permission to make any of the media specified read more »

Media.setModerationStatus

Sets the moderation status for a file.

Visit the article about moderation for more information.

read more »
Media.trashFile

Use this method to trash file(s) from the system.

You must have the media.trashFile permission to call this service on media owned by another user (including the public user). Otherwise you may only trash your own media; you must be logged in to do so. If you do not have permission to trash any of the media specified this function will immediately abort and some media that you specified read more »

Media.uploadCompleted

This is used in conjunction with media.getUploadURL, once the upload has been completed to Amazon, this method must be called to trigger the converters to handle the file.

read more »
Media.vote

Use this method to vote on the media item.

Voting on a media works in either of 2 ways:
1) Voting as a logged in user: this is done when uid is passed to the function or the user is actually logged in.
2) Making anonymous votes without reCaptcha.

read more »