Android Large Video Uploading to server?

后端 未结 2 1783
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-25 15:44

Android large video uploading to php server ,I read many answer in stackoverflow.

uploading video upto 50MB to the server

Android: OutOfMemoryError while uploadi

相关标签:
2条回答
  • 2021-01-25 16:26

    You shouldn't be setting a large byte[] to the entity. It's bound to run out of memory. You could use a FileEntity here.

    http://developer.android.com/reference/org/apache/http/entity/FileEntity.html

    Some related questions and links

    Android send photo using HttpPost/HttpGet

    Try this: Sending images using Http Post

    0 讨论(0)
  • 2021-01-25 16:30

    If the OutOfMemory error is coming from the server, the quick fix would be to update your php.ini variables:

    upload_max_filesize = 100M
    

    (or whatever you feel comfortable with)

    or if you are POSTing, then you'll also want to change

    post_max_size = 100M
    
    0 讨论(0)
提交回复
热议问题