Export (0) Print
Expand All

3.3.5.1.2 PutRelativeFile

Office

Create a new file on the WOPI server based on the current file.

HTTP Verb: POST

URI: HTTP://server/<...>/wopi*/files/<id>?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_RELATIVE".

X-WOPI-SuggestedTarget

A UTF-7 string specifying either a file extension or a full file name.

If only the extension is provided, the name of the initial file without extension SHOULD be combined with the extension to create the proposed name.

The WOPI server MUST modify the proposed name as needed to create a new file that is both legally named and does not overwrite any existing file, while preserving the file extension.

This header MUST be present if X-WOPI-RelativeTarget is not present.

A string that is a file extension or a full file name.

X-WOPI-RelativeTarget

A UTF-7 string that specifies a full file name. The WOPI server MUST NOT modify the name to fulfill the request.

A string that is a full file name.

X-WOPI-OverwriteRelativeTarget

A Boolean value that specifies whether the host MUST overwrite the file name if it exists.

A Boolean value.

X-WOPI-Size

An integer that specifies the size of the file in bytes.

An integer.

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

Response header

Usage

Value

X-WOPI-ValidRelativeTarget

A UTF-7 string provided by the WOPI server that the WOPI client MAY use as the value of X-WOPI-RelativeTarget in a future PutRelativeFile operation.

This header MAY be included when responding with the following status codes:

400

409

A string.

X-WOPI-Lock

A string provided by the WOPI client that the WOPI server MUST use to identify the lock on the file. This header MUST only be included when responding with the 409 status code.

A string.

X-WOPI-LockFailureReason

A string indicating why the operation failed. There is no standard for how this string is to be formatted. This string MUST NOT be used for anything other than logging. This header MAY only be included when responding with the 409 status code.

A string.

X-WOPI-LockedByOtherInterface

A string indicating that the file is currently locked by another client. This header MAY only be included when responding with the 409 status code.

The string "true".

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

Status code

Description

200

Success

400

Specified name is illegal

401

Token is invalid

404

File unknown/User unauthorized

409

Target file already exists or the file is locked; if the target file is locked, an X-WOPI-Lock response header containing the value of the current lock on the file MUST be included

413

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

500

Server error

501

Unsupported

Show:
© 2016 Microsoft