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 |
injector | STRING | A user-defined string, allows tracking where a file was inserted from. | STRING | videomixer, feedImporter2, httpupload, MediaFactory.com |
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) |
externalids | ARRAY | This is an array of the third party IDs for the file; it is available only if the file is hosted by one of our partners, such as Twitter, Instagram, Youtube, Brightcove, Widen and Ooyala.
The external id provider values are stored as an integer, and are below: - 0 - other: any provider other than the 7 mentioned below. You can store any reference using this provider.
i.e. 'http://www.arbitrarysite.com/image=123' - 1 - Brightc ove
- 2 - Youtube
- 3 - Instagram
- 4 - Twitter
- 5 - Widen
- 6 - Apple
- 7 - Ooyala
NOTE 1 Each recordset in the array is an array itself that contains the following: < li>external_id (string)- external_id_provider (integer)
- created (the date the externalid record created/updated)
- vhost
- primary_external_id (Integer. States whether this is the media's primary external id: possible values: 1 or 0.)
.
NOTE 2Only one record can be the primary external id for each media.
NOTE 3The record that is noted as the primary external id is stored in the externalid with the reference to the external id provider stated b efore the external id. | empty | Format
array ( < ext. id provider 1 > => '< external id a >', < ext. id provider 2 > => '< external id b >' )
Exam ple 1: Updates media's external ids for Brightcove and Instagram.
array( 1 => '545433_57632' 3 => '545433_57633' )
Example 2: Sets the `primary external i d` the media yo 2. NOTEYou can not set the `primary external id` to an externali id that does not exist for the media.
array( 1 => '545433_57632' 3 => '545433_57633' ) |
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 |