Flex 3 多次上传进度监控
我有一个 Flex3 应用程序,它必须能够上传多个文件并使用标签而不是进度条监视每个文件的单独进度。
我的问题是,上传的通用进度处理程序无法(据我所知)指示正在进行的上传。我知道可以检查文件名,但在此应用程序中,多次上传的文件名可能相同。
我的问题:使用通用进度处理程序如何区分具有相同文件名的 2 个多个上传?
编辑:回答者可能会认为我是 Flex 的新手...因为我确实是。
I have a Flex3 application which has to be capable of uploading multiple files and monitoring each files individual progress using a label NOT a progress bar.
My problem is that a generic progress handler for the uploads has no way (that I know of) of indicating WHICH upload it is that is progressing. I know that a file name is available to check but in the case of this app the file name might be the same for multiple uploads.
My question: With a generic progress handler how does one differentiate between 2 multiple uploads with the same file name?
EDIT: answerers may assume that I am a total newb to Flex... because I am.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用这个:
其中“调度程序”是文件:
和示例处理程序:
我不确定您希望如何区分具有相同名称的两个文件。就我而言,我将文件放入队列中发送。所以一次只能上传 1 个文件。 (待处理文件)。
I use this:
where "dispatcher" is the file:
and a sample handler:
I'm not sure how you want to differentiate between two files with the same name. In my case, I send the files in a queue. So there's only ever 1 file being uploaded at a time. (pendingFiles).
如果您正在侦听 ProgressEvents,这些事件有一个
currentTarget
属性,该属性将引用已注册事件侦听器的对象。我假设您首先知道每个对象对应哪个文件上传对象。
编辑:使用 FileReference 的示例:
If you are listening for ProgressEvents, these events have a
currentTarget
attribute that would have a reference to the object that has registered the event listener.I'm assuming you know which file-uploading object goes with each object in the first place.
EDIT: Example using FileReference:
我最终创建了自己的类来管理每个上传文件的事件
I ended up creating my own class that manages events for each uploading file