To upload a file, send an HTTP POST request to
http://upload.box.net/api/1.0/upload/<auth token>/<folder id>
Note: Uploading a file to this URL will fail if a file by the same name already exists.
If you wish to overwrite a file (useful especially for OpenBox), send the request to:
http://upload.box.net/api/1.0/overwrite/<auth token>/<file_id>
Note: You do not have to construct this URL manually if you are using OpenBox. While creating your action, configure your Callback parameters to include overwrite_url.
If you wish to make a new copy of a file that exists (and take the filename of that file and prepend "Copy of" to it):
http://upload.box.net/api/1.0/new_copy/<auth token>/<file id>
Note: You do not have to construct this URL manually if you are using OpenBox. While creating your action, configure your Callback parameters to include new_copy_url.
The HTML to perform an upload might look like the following:
<form action="http://upload.box.net/api/1.0/upload/0ef4e2b1be630554ffa4044c054b1954/756"
enctype="multipart/form-data" method="POST">
<input type="file" name="new_file1" />
<input type="file" name="new_file2" />
<input type="text" name="share" value="1" />
<input type="text" name="message" value="Hello" />
<input type="text" name="emails[]" value="test@domain.com" />
<input type="text" name="emails[]" value="test1@domain.com" />
<input type="submit" name="upload_files" value="Upload File" />
</form>
<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>upload_ok</status>
<files>
<file file_name="read_me.txt" id="5996" folder_id="756" shared="0" public_name="" />
<file file_name="Rally.avi" error="filesize_limit_exceeded" />
</files>
</response>
If the result wasn't successful, the status field can be:
'upload_some_files_failed',
'not_logged_id',
'application_restricted'
For files that wasn't upload error field can be:
not_enough_free_space,
filesize_limit_exceeded,
access_denied
Page Information
|
Wiki Information |
![]() Update to PBwiki 2.0 An entirely new PBwiki experience, including folders and easier editing. |