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

Add upload parameter support (VPU/Apps/Signature#5)

parent 7456e641
Branches
No related tags found
No related merge requests found
...@@ -225,14 +225,15 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) { ...@@ -225,14 +225,15 @@ export class FileUpload extends ScopedElementsMixin(VPULitElement) {
/** /**
* @param file * @param file
* @param params
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
async uploadFile(file) { async uploadFile(file, params = {}) {
this.uploadInProgress = true; this.uploadInProgress = true;
this.sendStartEvent(file); this.sendStartEvent(file);
let url = this.url; let url = new URL(this.url)
url.search = new URLSearchParams(params).toString();
let formData = new FormData(); let formData = new FormData();
formData.append('file', file); formData.append('file', file);
// I got a 60s timeout in Google Chrome and found no way to increase that // I got a 60s timeout in Google Chrome and found no way to increase that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment