cURL
We would not recommend to use the cURL integration for production, but it can be convenient for a quick test when you don't have an SDK lying around.
Install
brew install curl jq || sudo apt install curl jq
Example
# Prerequisites: brew install curl jq || sudo apt install curl jq
# To avoid tampering, use Signature Authentication
echo '{
"auth": {
"key": "YOUR_TRANSLOADIT_KEY"
},
"template_id": "YOUR_TEMPLATE_ID"
}' |curl \
--request POST \
--form 'params=<-' \
--form my_file1=@./joe-gardner-149699.jpg \
https://api2.transloadit.com/assemblies \
|jq