Preflight check before new version upload

options
https://api.box.com/2.0
/files/:file_id/content

Performs a check to verify that a file will be accepted by Box before you upload a new version of a file.

Request

multipart/form-data

Path Parameters

stringin pathrequired
12345

The unique identifier that represent a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123.

Request Body

stringin bodyoptional
File.mp4

The optional new name for the file. When not provided the preflight check will not verify if the name is a valid file name.

objectin body

The optional different parent folder to upload the file to. When not provided the preflight check will not verify if the user has upload access to the destination folder.

stringnulloptional
123

The ID of parent item

integer / int32in bodyoptional
1024

The optional size of the file in bytes. When not provided the preflight check will not verify if the user still has space in their account for the file.

Response

application/jsonUpload URL

If the check passed, the response will include a session URL that can be used to upload the file to.

application/jsonConflict error

If the check did not pass, the response will include some details on why it did not pass.

application/jsonClient error

An unexpected client error.

options
Preflight check before new version upload
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -X OPTIONS https://api.box.com/2.0/files/content \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H "Content-Type: multipart/form-data" \
     -F attributes='{"name":"Photo.jpg", "parent":{"id":"11446498"}}'
Node
// Check if uploading a larger version of this file will succeed
client.files.preflightUploadNewFileVersion('87646', {size: 300000000}, null, callback);