fileData is an array that consists of the information that you want to have stored in your media.
Name | Type | Description | Default | Possible Values |
---|
title | STRING | The title associated with the text media item. | empty | empty / STRING |
message | STRING | The media message to be included with the media item. | empty | STRING |
uid | STRING | The UID of the user who created the media item. | 1 | INT |
tags | STRING | A space separated string containing words to be used as tags for the media item. | empty | empty / STRING |
filename | STRING | A string that is going to be assigned as the original name of the file. | empty | empty / STRING |
extension | STRING | The extension that is going to be set as the original file extension of the text file. | empty / STRING | png,jpeg,mov |
channel | INT | The channel ID the media item is going to be uploaded into. | empty | INT (channel ID) |
date | YYYY-MM-DD HH:MM:SS | The date and time the media item started to be uploaded. | empty | YYYY-MM-DD HH:MM:SS |
url | STRING | The url reference. | empty | empty |
metadata | ARRAY | An ARRAY for any additional information that is to be stored with the media item. It is stored as an associated array in this field.
NB 1: You have to set the values of the metadata as an array which itself is a value of the 'users' array.
NB 2: When retrieving the information about the media using the API (via function Media.fileGetInfo), you do not specify the 'user' key: the data is returned as: metadata['synopsis'] = 'test1 | empty | array( 'user'=> Array ( 'synopsis' => 'test1', 'pin' => 'test2' ) ) |
moderationstatus | INT | The initial moderation status of the media item once it is uploaded into MediaFactory. | 0 | 0,1,2,3,4 OR (unmoderated, accepted, denied, deleted, notdenied, moderated, all) |
geo_latitude | NUMBER | The latitude of of where the media item was created. This is usually set in conjunction with Google Maps and the user plotting the pin on the map. | empty | 62.86 |
geo_longitude | NUMBER | The latitude of of where the media item was created. This is usually set in conjunction with Google Maps and the user plotting the pin on the map. | empty | -52.44 |
parentid | INT | The media ID that is going to be assigned as the parent to this media item. This would be used in conjunction with context to create text comments. | empty | INT |
context | STRING | The type of media that is being uploaded. | 'generic' | 'generic', 'all', 'comment', 'note', 'commentnote', 'genericcomment', 'parent','child' |
language | STRING | A 2-letter ISO code associated with the media. | n/a | STRING |
visibility | STRING | The visibility of the media item to the public once uploaded into MediaFactory. | 'VISIBLE' | 'VISIBLE', 'HIDDEN' |
groupid | INT or ARRAY | The ID, or array of IDs, of the group that the media item is going to be uploaded into.
Note: To specify that the media item should _NOT_ be added to a group, set this value as 0. | empty | 9499 or array(9499,9500) |
fileData is an array that consists of the information that you want to have stored in your media.
Field | Description | Possible Values |
---|
titlea | N/A |
messagea | N/A |
uida | N/A |
tags (tags are a string, multiple tabs are delimited by spaces)a | N/A |
filenamea | N/A |
extensiona | N/A |
channel (an id)a | N/A |
date (YYYY-MM-DD HH:MM:SS)a | N/A |
injector (A user-defined string, allows tracking where a file was inserted from)a | N/A |
urla | N/A |
metadata ( array )a | N/A |
moderationstatusa | N/A |
geo_latitudea | N/A |
geo_longitudea | N/A |
parentida | N/A |
context:a | N/A |
+ 'generic': default, normal mediaa | N/A |
+ 'comment': comments on a media itema | N/A |
+ 'note': moderator's notea | N/A |
language (2-letter ISO code)a | N/A |
visibility, must be one of "HIDDEN" or "SHOWN", default is "SHOWN"a | N/A |
groupid (a group ID or array of group IDs)a | N/A |
eventid (an event ID or array of event IDs)a | N/A |