Generic Video Uploading to Server Model
the general method (inspired by the revver API, and very simplified) consists of 2 parts:
- HTTPS connection to the server, with XML-RPC communication between client and server
- HTTP POST of the video file to a specificaly negotiated URL.
Client side communication
- make a https connection to a given url. for example; https://demo.vmfx.com/xmlrpc.php?username=bob?password=bob
- communicate by sending simple XML-RPC messages and parsing the response
- to upload:
- the user requests an upload token, and sends the metadata along with this
- if acceptable, the server returns a token in the xml-rpc response, this is in the form of a specific url to post to. it also reutrn an url to a page to display the final movie
- the user then performs a standard HTTP POST to the given url, and the display url becomes valid
Server side mechnism
- most likely a php script will serve the xml-rpc requests.
- the server creates a hash token of username, filename and datetime and returns this embedded as a parameter in an url
- the server will receive a file posted to the previosly given url
RPC
extra types
struct clip
| name | type | description |
| start | int | start frame of clip |
| end | int | end frame of clip |
| name | string | name for this clip |
| keywords | string array | keywords for this specific clip |
struct upload_info
| name | type | description |
| post_url | string | the url to HTTP POST the video to |
| view_url | string | the url that will be used to view the video one it has been uploaded |
request_upload
method
parameters
| name | type | description |
| filename | string | the exact filename that will be uploaded. It must not vary from the actual uploaded file, or the upload will fail |
| title | string | a title for the video |
| description | string | a description of the movie file |
| clips | clip array | an array of clips with associated keywords throughout the film |
| thumbframe | int | frame number to be used as a thumbnail identifier for the film |
return value
| name | type | description |
| post token | string | the exact filename that will be uploaded. It must not vary from the actual uploaded file, or the upload will fail |
failure will result in an xml-rpc fault. the fault codes are described below:
other points
- im not sure about https authentication, how the username and password are handled by the server on the initial connection
- slight problem is a file will be uploaded even if the token is invalid. not a security problem, just not bandwidth optimal
