Home

 

Updating a file

Update a file in your file collection programmatically.

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


Atom API request details

Method Resource address Input representation Description
PUT Determine the resource address in either of the following ways:

  • Value of the href attribute of the <link rel="edit-media"> element in the file's Document Atom entries.

  • Construct the address using the following URL:

      /basic/api/myuserlibrary/document/{document-id}/media
      

where {document-id} is the <td:uuid> or <td:label> element of the document entry.

binary media Updates a file in your collection.

You can use one or more of these headers.


Input headers

Parameter Required Description
Content-Type No Used to specify the mime type for the content being sent to the server. If the collection does not support the specified content type, the server returns HTTP response code 415 (Unsupported media type). When a media resource is posted, the mime-type of the resource is set to this value if it is provided. Otherwise, the mime-type of the extension of the Slug header is used. A Content-Type that is an empty string, whitespace only, or equal to "unknown/unknown" is considered to be not-specified.
Content-Language No Specifies the language of the content being sent to the server. All contents are handled using UTF-8 encoding on the server.
Content-Length No Specifies the content length when sending media content.
Slug Yes Contains the file path and label of the resource to be updated in the collection. You can include non-ASCII characters in this header, but they must be properly encoded according to the RFC 2047.

You can use one or more of these input parameters. Separate multiple parameters with an ampersand (&).


Input parameters

Parameter Description
identifier String. Indicates the identifier used in the document segment of the Web address. Options are uuid or label. Uses the UUID as the identifier by default.

 

Input

A file consists of both the information about the file, which is also known as metadata, and the binary data that the file contains. In the Atom Publishing Protocol, the resource that contains the metadata is called a "Media Link Entry" and the resource that contains the binary data is called a "Media Resource". In the Files API, a document entry is the Media Link Entry, and the document media is the Media Resource.

 

Output

None. Returned HTTP Headers

Error codes


Working with files

 

Related reference


File content


+

Search Tips   |   Advanced Search