push

Upload and associate a piece of content (photo, video, or document) to another piece of content that already exists on the platform.

Parameters

NameDescription
user_id required The user that’s performing the action.
owner_xid required The cross reference id that the uploaded content is attached to. (ie: statusId, post_id, message_id, etc.)
owner_type required The cross reference content type that the uploaded content is attached to. (ie: blog_post, photo, video, photo_gallery, user_profile, group, forum_post, forum_thread, forum, message, site, audio, audio_gallery, podcast, petition, document, article, article_version, calendar_event, calendar, wiki_page, ugc_status, ext_content, discussion_post)
type required The type of content that’s being uploaded. (ie: photo, video, document)
name required The user facing name of the downloadable item – including the file extension.
site_id required The site id that the attachment is associated with. Almost always should be the same value that the owning piece of content has.

Request Syntax

curl -i -X POST ‘https://services.onesite.com/1/attachment/push.json?devkey=[devkey]&owner_type=blog_post&owner_xid=117118139&user_id=229928503&type=photo&name=Cars-Are-Cool.jpeg&site_id=234714047’ -F “file=@/home/developer/development/work/onesite/ugc-samples/cars/cars.usnews.com.jpeg”

JSON Response