跳到主要内容

updateFileIfExist

BooleanWrapper updateFileIfExist(SettingsRequestDto)

PUT /api/2.0/files/updateifexist

Update a file version if it exists

Reports that uploading a file under a name that already exists does not update the existing file. The operation is a stub kept for compatibility: the request body is read but ignored, nothing is stored, and the answer is always false, so calling it changes no behaviour and repeating it changes nothing. What actually decides the outcome of a name clash is the parameter of the upload itself - see the createNewIfExist and conflict-resolution parameters of the operations under api/2.0/files/{folderId}/upload and of PUT api/2.0/files/fileops/copy. Any authenticated role down to a guest may call it; an unauthenticated caller is refused. Because the value is a constant, there is nothing to read back afterwards, and GET api/2.0/files/settings does not publish it. To add a version to a document that is already stored, address the file directly through the update operations under api/2.0/files/file/{fileId} instead of uploading under the same name and relying on this setting.

Parameters​

NameInTypeDescriptionNotes
SettingsRequestDtobodySettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Always false: an upload does not update an existing file by nameBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

BooleanWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json