Learn Programming through LIVE online classrooms

iOS Swift Discussion Forums

There's no such thing as a stupid question. Ask. Discuss. Learn.

Upload (big) video files in chunks, using Alamofire and Swift

Is there a way to upload a big video file in chunks using Alamofire? So, when upload fails, that I only re-upload certain chunk?

Currently, I am aware of this: https://stackoverflow.com/questions/40398201/alamofire-upload-huge-file, which is using NSStream, that helps with memory issues when it comes to big files. Still I am not sure how upload failure would work in that case? I will try it but it would be nice if anybody can shed some light about going with this method.

Another way, I see as splitting data (NSData) in chunks... But I have no idea how I would actually handle upload failure. I guess, I should get from server a response about what part should be re-uploaded?

So, what would be a good way to implement something like this?

I guess I am trying to do something like this: https://stackoverflow.com/questions/21979087/blueimp-multiple-chunk-upload-with-form-data

Jovicevic Vladimir 10 months ago
  • Sabur Kolinc

    I am developing an iPhone app with Swift. and I use the Alamofire framework to handle http requests. I use Alamofire.request for POST, GET, etc. Alamofire.request:
    And I use Alamofire.upload to upload the image to the server and learned this here: https://osxtips.net/why-does-my-iphone-keep-restarting/. Pretty handy for learning.

  • Whitelisted Links