Create media resources 

When you upload a file to a blog, the server creates a media resource entry to represent the file. To create a media resource, post the file to the blog using the HTTP POST method.

The types of files, and the maximum sizes of the files that can be uploaded to a blog is defined by the Blogs administrator. See the Administer Blogs section of the IBM Connections product documentation for more details.

In addition to creating a media resource entry to represent the file, the server also creates an entry called a media link entry that contains information about the file. You can use the media link entry to separately retrieve metadata of the media resource.

See Authenticating requests for information about how to authenticate the request.

Note: Draft authors are not allowed to post media content to a blog.

Table 1. Atom API request details

Method Resource URI Input representation
POST Media link entries Value of the href attribute of the <collection> element that has a child <title> element with a value of Media Entries in the user's service document. file


Input

Provide a data file in one of the following ways:

You must also specify the content type of the file. For example, if the file has a JPEG extension, specify the content type as follows:

content-type:image/jpeg 


Output

None.

Returned HTTP headers

HTTP/1.1 201 Created

Location: url

Error codes


Parent topic

Work with media resources

Related reference
Media link content


   

 

});