Skip to content
Snippets Groups Projects
Commit 3d3d32cc authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Return queue key after queuing (VPU/Apps/Signature#7)

parent f8881b37
No related branches found
No related tags found
No related merge requests found
......@@ -242,15 +242,18 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) {
/**
* @param file
* @returns {Promise<void>}
* @returns {Promise<number>} key of the queued item
*/
async queueFile(file) {
this.queuedFiles[Math.floor(Math.random() * 1000000)] = file;
const key = Math.floor(Math.random() * 1000000);
this.queuedFiles[key] = file;
this.queuedFilesCount++;
const data = {"file": file};
const event = new CustomEvent("vpu-fileupload-file-queued", { "detail": data, bubbles: true, composed: true });
this.dispatchEvent(event);
return key;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment