Google Apps 中的 Apache commons 文件上传和进度百分比
我正在尝试使用 ProgressListener 更新调用来获取每个文件的完成百分比。文件数量是动态选择和上传的。
public class ProgressListenerImpl implements ProgressListener
我可以在更新调用中使用“item”参数吗?
update(long bytesRead, long contentLength, int item)
并将它们关联到 UI 中动态创建的每个 iframe?是否有本质上更容易或更简单的替代建议?
该应用程序必须采用托管在 Google App Engine 上的 Java 语言。我没有将文件保存到任何文件系统,而是使用流将数据重定向到 Google 网站。
I am trying to use ProgressListener update call to obtain percentage completion of each file. Number of files are dynamically chosen and uploaded.
public class ProgressListenerImpl implements ProgressListener
Will I be able to use the "item" parameter in the update call?
update(long bytesRead, long contentLength, int item)
And associate them to each iframe dynamically created in UI? Is there alternative suggestions that are easier or simpler in nature?
The application has to be in Java hosted on Google App Engine. I am not saving files to any filesystem but using the stream to redirect data to Google sites.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在收到整个请求之前,不会调用您的代码 - 所以不,您无法从服务器端监控上传进度。
Your code isn't called until the entire request has been received - so no, you can't monitor upload progress from the server end.