如何在Android手机峡文件上传分块读取数据 [英] How to Read Chunked Data from Phone Gap File Upload in Android

查看:288
本文介绍了如何在Android手机峡文件上传分块读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正试图从一个PhoneGap的移动应用的Web服务器上传视频文件。在iPhone一切都很正常,但在Android上的数据块中发送,我们的服务器应用程序(PHP)无法处理它。

We are trying to upload videos files from a phonegap mobile app to a web server. In iPhone everything works great, but on on Android the data is sent in chunks and our server app (php) is unable deal with it.

//phonegap 
var options = FileUploadOptions();
options.chunkedMode = true; //default

我们试图转向chunkedMode为false。通过与超过1MB Android手机死机的任何影片,更小的文件有效。 (这是他们把chunkMode默认情况下的原因)。

We tried turning chunkedMode to false. That works with smaller files by with any videos over 1mb the Android phone crashes. (that's the reason they turn chunkMode on by default).

我们的问题是如何使用PHP读取上传的数据块?是否有Apache将需要被打开来读取这些数据?设置

Our question is how to read the uploaded chunk data using php? Is there a setting in Apache to that needs to be turned on to read this data?

推荐答案

这结束了​​作为一个网络服务器的问题。 Apache需要进行配置,以支持分块模式。还要注意的是NGNIX不具备分块模式支持默认情况下,你需要安装一个模块 HTTP://wiki.nginx。组织/ HttpChunkinModule

It ended being an webserver issue. Apache needs to be configured to support chunked mode. Also note that NGNIX does not have chunked mode support by default you would need to install a module http://wiki.nginx.org/HttpChunkinModule

这篇关于如何在Android手机峡文件上传分块读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆