Movedigital.upload.postFile
From MoveDigital Docs
This API call will upload a file directly from a local computer into MoveDigital. It is best to first call movedigital.auth.checkSession to confirm that your session is valid before beginning an upload. Otherwise movedigital.upload.postFile only checks that the user is signed in once the entire file has been uploaded. This means that if the session has become invalid, the user would only learn of this after spending the time to upload the file. This scenario can be avoided by calling movedigital.auth.checkSession manually before calling movedigital.upload.postFile.
| Table of contents |
[edit]
Arguments
File uploads of this type should be POSTed to http://www.movedigital.com/services/rest/ and should include the following arguments
- method (required) - Must be set to: movedigital.upload.postFile
- userid (required) - The userid of the MoveDigital account.
- sessionid (required) - The sessionid for the current session.
- session (required) - The current session identifier as returned via the api authentication mechanism.
- file (required) - The file to upload.
[edit]
Example Responses
- Success
<?xml version="1.0" encoding="utf-8" ?> <rsp stat="ok"> <method>movedigital.upload.postFile</method> <format>rest</format> <fileid>72</fileid> <filename>filename.mpg</filename> <folderid>1032</folderid> <foldername>upload</foldername> <filevisibility>private</filevisibility> <fileurl>http://download.movedigital.com/foo/72/filename.mpg</fileurl> <fileinfourl>http://download.movedigital.com/foo/72</fileinfourl> <messages> <message msg="File successfully uploaded." /> <message msg="The download URL for your file is: 'http://download.movedigital.com/foo/72/filename.mpg'" /> <message msg="The info page URL for your file is: 'http://download.movedigital.com/foo/72'" /> </messages> </rsp>
- Error
<?xml version="1.0" encoding="utf-8" ?> <rsp stat="fail"> <method>movedigital.upload.postFile</method> <errors> <error code="99" msg="You are not signed in."/> </errors> </rsp>
[edit]
Error Codes
- 80 - Filesize was 0 bytes in length.
- 81 - Storage quota exceeded.
- 82 - Filename collision.
- 98 - Insufficient permissions.
- 99 - User not logged in.
- 108 - Internal error.
- 109 - Service is currently unavailable.
- 110 - Upload failed.
[edit]
Live REST Demo
[edit]

