Open NSURLSession0 opened 9 years ago
Yeah from the malloc error, I bet it is because the video is too large and the device runs out of memory. We would need to be able to stream the upload to keep this from happening. It isn't really setup right now to do something like that, so it will probably take some thought and exploration of the APIs to figure out the best solution.
That API is what I would reach for first, but if memory serves it is fairly limited in what it can do with multipart wise. Might be improved in iOS 9 or a possible solution built off of it though.
I use the 'Swift HTTP backwards compatibility branch' for my project and my app crashes when I try to upload a video (~3 minutes, iPhone 6 camera quality).
My code:
Sometimes I get this error:
Other times I get (SwiftHTTP: HTTPRequestSerializer.swift):
My Phone is running iOS 9.0 and my app uses Swift 2.
Does anyone have any idea what could be the problem?
Edit: I think it's because my video file eats all the memory. How can I upload large files?