I am using FineUploader in Core mode (which is working absolutely great - I cannot recommend it enough).

When I call addFiles(file) from somewhere else in the code, I would like to find out the id assigned to that file within the uploader so that I can know the context to process events when multiple uploads are happening simultaneously.

The id is passed into the events and there are several methods to get information based on the id, but what is the best place to get that id after calling addFiles?

Thanks.

有帮助吗?

解决方案

You can get information about all files submitted to Fine Uploader, including IDs, via the getUploads API method.

For example:

qq.each(uploader.getUploads(), function(idx, fileItem) {
    qq.log(fileItem.id);
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top