iOS assync background upload?

Archived from the Transloadit support forum. Originally posted on April 3, 2014; details may be outdated, see our docs for current behavior. Original thread

We currently discuss how to use transloadit. Our goal is to upload media asynchronous for background iOS uploading.

The developers telling me that they have to use either File/NSData/NSInputStream to be able to use the background functionalities on iOS. The problem they see is that uploading the media via HTTP multipart/form-data is ineffective together with File/NSData/NSInputStream on iOS.

Is it possible to POST binary in the HTTP Body only and adding the template-id, keys, etc. in the HTTP Header?

Hey Simon,

unfortunately we parse and read all the assembly params (template ID, auth, etc.) from the HTTP Body. We do not inspect any http headers in this regard. : /

How is the uploading ineffective this way?

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hi Tim,

Thanks for clarification. This way of params passing does not result in a performance issue but increases the complexity of our code on iOS side. However we will manage it.

Official Transloadit iOS SDK can not help us here because to upload a file it keeps the whole file in memory which is not acceptable in case of uploading several big files simultaneously.

Best regards,
Yury

Alright, I’ll address this with the SDK developers. Maybe we can come up with a second “mode” or something that does not keep the file in memory.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hi Tim,

we figured out that there exist some serious problems on iOS that are somehow related to this ticket.

https://github.com/AFNetworking/AFNetworking/issues/1398
https://devforums.apple.com/message/919330#919330
https://github.com/AFNetworking/AFNetworking/commit/REDACTED (workarround for AFNetworking)

We are working on a solution that will work for us, but maybe the link and the discussions on the apple forum will help your iOS guys to solve this ticket.

Simon

Hey Simon,

we’ll let the iOS SDK authors know. Thank you for posting these.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos