Uploads a file from the the software’s filesystem to a web service, using http or https.
To use this function, first identify the file to upload by dragging an existing File type - typically called File Contents - from a previous card in the Flow, for example a download card from another cloud service. Then specify the URL - including the http:// or https:// part and any query string parameters - in the URL input. Then select the http method - PUT or POST - and set any headers required by the service. Typically there will be some headers required, for authentication at least. For example if the site requires authorization, you could add a header “Authorization: Bearer my-token” by adding an Authorization key to the Headers section and setting its value to Bearer my-token. Similarly you could set “Content-type: application/image” the same way.
The output is dependent on the response from the service. To access a particular response properly, create an output with the same name as the key in the response object.
Important note: this function is not capable of doing multi-part upload - that functionality is in development now, please let us know if you need it sooner.
- File Content (file) - required: the ID of the file contents to upload
- URL (text) - required: the URL of the request, including the protocol http:// or https://
- Method (option) - required: the http method to use - PUT or POST
- Headers (optional) - user-created fields (text) to define headers to use in the file request
Output Fields
Example
Here is an example of accessing the Algorithmia file system, one of our partners.
Algorithmia requires that the full file path and filename of the destination file be specified in the URL.
They also require an authentication token (replace that with a real one) and a specific Content-Type.