Demo code for using curl is provided as: 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
What I want the ability to do is use Apple’s networking stack to upload files in the background. This means that the file payload gets sent as the singular block of data. To construct a multipart form, I would need to be able to post fix a form termination line.
Is there some other way to encode the authorization parameters in the header? Really, the key and auth could use basic authentication and the template be a parameter (in principal).
just asking if there is another way to construct the request.