Performs a check to verify that a file will be accepted by Box before you upload a new version of a file.
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
.
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.
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.
123
The ID of parent item
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.
If the check passed, the response will include a session URL that can be used to upload the file to.
If the check did not pass, the response will include some details on why it did not pass.
An unexpected client error.
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"}}'
// Check if uploading a larger version of this file will succeed
client.files.preflightUploadNewFileVersion('87646', {size: 300000000}, null, callback);