Hi I am trying to capture a video in my android mobile and upload it to a server. My current video size is 44mb and which crashes in the middle of the upload. But my other videos which are less in size gets uploaded without any trouble.
So I just want to know,
-
is there any upload limit in the mobile ? or
-
The problem is since I am uploading a huge video?
You are probably running out of memory because the upload stream isn’t uploaded by parts but instead the whole thing is stored until the upload is complete and then garbage collected. I have tried every available buffering solution but it isn’t happening unless you use multipart.
If this is the error you are getting you will need to use multipart upload to get the whole thing uploaded. Search on google or stack on examples on how to do this. its not much different than using a http client, you will just need the http mime libraries from apache.
Here is a link that might help:
Multipart
Also apart from this limitation to not clearing the uploaded buffers until the upload is complete there is no limit to how much data you can transfer in a single request.