Update a resumable file

Contents

Update the content of a resumable file.

Endpoint URL: {network.internalDNSName or network.proxyURL} received in DeviceInformation

Request Syntax


PUT /v2/files/:id/resumable/content



Request Headers

Parameter Description Required
Authorization An access token with nas_read_write scope as well as the File Permission with value WriteFile or FileOwner for the file or a parent.

Value of type: string
true
If-Match A previous response ETag or *. Return the object only if its entity tag (ETag) is the same as the one specified.

Value of type: string
false
If-None-Match A previous response ETag or *. Return the object only if its entity tag (ETag) is different from the one specified.

Value of type: string
false


Request Path Parameters

Parameter Description Required
id The resumable file ID.

Value of type: string
true


Request Query Parameters

Parameter Description Required
done Whether to commit the file after having written the content.

Value of type: boolean

Default: false
false
offset The offset in the resumable file where to start writing the content. Can be after the end of the file (in which case a sparse area will be created).

Value of type: integer

Default: 0
false
truncate Whether to truncate the file after having written the content.

Value of type: boolean

Default: false
false


204 Response

The normal case will be 204.

Response Headers

Parameter Description Required
ETag The ETag for the resumable file metadata and content.

Value of type: string
false


Example

Sample request to update a resumable file content.

Request


PUT /sdk/v2/files/f2v8O8_JI70OY4SlIQME7Hr65MoBGKQPi686Qa3w/resumable/content?done=false&truncate=false&offset=10 HTTP/1.1
Host: Endpoint-URL
Authorization: Bearer 9e9d3d16-f9b1-43dc-8599-d1db6fcedfa9
Content-Length: 20
Content-Type: application/x-www-form-urlencoded

Response


HTTP/1.1 204 No Content
Etag: "BA"
Vary: Origin
Date: Mon, 29 Aug 2016 21:59:31 GMT

Have question about this section?