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
The Transloadit-Client header identifies cURL and its installed version to help with debugging.
# Prerequisites: brew install curl jq || sudo apt install curl jq
# To avoid tampering, use Signature Authentication
echo '{
"template_id": "YOUR_TEMPLATE_ID",
"auth": {
"key": "YOUR_TRANSLOADIT_KEY"
},
"steps": {}
}' | curl \
--request POST \
--header "Transloadit-Client: curl:$(curl --version | awk 'NR == 1 {print $2}')" \
--form 'params=<-' \
--form myfile1=@./joe-gardner-149699.jpg \
https://api2.transloadit.com/assemblies | jq