Share via


3.3.5.3.2 PutFile

Update a file on the WOPI server.

HTTP Verb: POST

URI: HTTP://server/<...>/wopi*/files/<id>/contents?access_token=<token>

The request message for this operation contains the following HTTP headers.

Request header

Usage

Value

X-WOPI-Override

A string specifying the requested operation from the WOPI server. Required.

The string "PUT".

X-WOPI-Lock

A string provided by the WOPI client that the WOPI server used to identify the lock on the file. Required.

The string provided by the WOPI client through Lock (see section 3.3.5.1.14).

The response message for this operation can contain the following HTTP headers.

Response header

Usage

Value

X-WOPI-Lock

A string value identifying the current lock on the file. This header SHOULD be included when responding to the request with 409 status code. It SHOULD NOT be included when responding to the request with 200 status code.

A string.

X-WOPI-ItemVersion

An optional string value indicating the version of the file. Its value SHOULD be the same as Version value in CheckFileInfo.

A string.

The response message for this operation can result in the following status codes.

Status code

Description

200

Success

401

Token is invalid

404

File unknown/User unauthorized

409

Lock mismatch/locked by another interface;

413

File is too large. The maximum file size is implementation-specific.

500

Server error

501

Unsupported