Flex FileReference upload() 和 .data ...这会将整个文件加载到内存中吗?
我需要通过 Flex 应用程序将一个非常大的文件上传到我的服务器,我发现 Flex Filereference upload() 似乎能够处理它。 upload() 方法是否将“流”上传到 servlet,还是发送整个 ByteArray(据我所知,ByteArray 将包含整个文件内容,因此大于 1Gb 的文件将淹没我的内存)。
我还没有找到其中之一的确认。看来flex.net.FileReference源代码是flash的一部分,而不是开源的flex,所以我不能偷看。
当向服务器发送文件内容时,任何人都可以确认或否认整个 byteArray 的使用吗?
谢谢
I need to upload a very large file to my server, through my Flex application, and I see that Flex Filereference upload() seems to be able to handle it. Does the upload() methods uploads a 'stream' to the servlet, or does it sends the whole ByteArray (As I understand it, the ByteArray will have the whole file contents, so a >1Gb file will flood my memory).
I haven't found confirmation of one or the other. It seems flex.net.FileReference source code is part of flash, not the open source flex, so I cant take a peek.
Anyone can confirm or deny the usage of the whole byteArray when sending file contents to the server?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当尝试使用 Flash 上传大文件时,将文件加载到内存中并不是您最关心的问题 - 上传本身相当不可靠。根据Flex参考 Flash播放器正式支持上传文件大小最大为 100 MB。我的经验证实大文件上传经常失败。您可以检查这个文件上传组件来上传大文件出现裂缝并恢复部分上传。然而,该解决方案还需要在开始上传之前将文件完全加载到内存中。
When trying to upload big files using Flash, the loading of the file into memory is not your biggest concern - the upload itself is quite unreliable. According to the Flex reference Flash player officially supports upload file sizes of up to 100 MB. My experience confirms that big file uploads often fail. You may check this file upload component for uploading large files in chinks and resuming partial uploads. However this solution also needs to fully load the file into memory before starting the upload.
它看起来类似于 post 请求由文件输入html控件生成。所以它不是 ByteArray,但浏览器仍然需要在发送文件之前将文件加载到内存中; 1GB 对于任何文件上传来说都太大了——无论是否是闪存。
It looks similar to the post request generated by a file input html control. So it's not a ByteArray, but still the browser would need to load the file to its memory before sending it; 1GB is too much for any file upload - flash or not.