From 2e32ffaa398f077c5ddc81e950de010199c67c8d Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 10 Sep 2023 18:11:23 -0400 Subject: added progress for pdf uploads --- src/client/Network.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/Network.ts b/src/client/Network.ts index 631ec9122..e9f93fad3 100644 --- a/src/client/Network.ts +++ b/src/client/Network.ts @@ -58,11 +58,14 @@ export namespace Networking { ]) ); } + formData.set('fileguids', fileguidpairs.map(pair => pair.guid).join(';')); // If the fileguidpair has a guid to use (From the overwriteDoc) use that guid. Otherwise, generate a new guid. fileguidpairs.forEach(fileguidpair => formData.append(fileguidpair.guid ?? Utils.GenerateGuid(), fileguidpair.file)); } else { // Handle the case where fileguidpairs is a single file. - formData.append(fileguidpairs.guid ?? Utils.GenerateGuid(), fileguidpairs.file); + const guids = fileguidpairs.guid ?? Utils.GenerateGuid(); + formData.set('fileguids', guids); + formData.append(guids, fileguidpairs.file); } const parameters = { method: 'POST', -- cgit v1.2.3-70-g09d2