Partager via


DeleteFile

Optional for: iOS and Android Desktop

The DeleteFile operation deletes a file from a host.

Note

This WOPI operation isn't required to integrate with Office for the web or Microsoft 365 for mobile at this time.

POST /wopi/files/(file_id)

The DeleteFile operation deletes a file from a host.

If the file is currently locked, the host should return a 409 Conflict and include an X-WOPI-Lock response header containing the value of the current lock on the file. If the current lock ID is not representable as a WOPI lock (for example, it's longer than the maximum lock length), the host should return a 409 Conflict and set the X-WOPI-Lock response header to the empty string or omit it completely.

Parameters

  • file_id (string) – A string that specifies a file ID of a file managed by host. This string must be URL safe.

Query parameters

  • access_token (string) – An access token that the host uses to determine whether the request is authorized.

Request headers

  • X-WOPI-Override – The string DELETE. Required.

Status codes

In addition to the request and response headers listed here, this operation might also use the Standard WOPI request and response headers. For more information see Standard WOPI request and response headers.