aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/Network.ts5
-rw-r--r--src/client/documents/Documents.ts7
2 files changed, 4 insertions, 8 deletions
diff --git a/src/client/Network.ts b/src/client/Network.ts
index 9c293f9af..1ab9c6fc5 100644
--- a/src/client/Network.ts
+++ b/src/client/Network.ts
@@ -30,7 +30,7 @@ export namespace Networking {
}
/**
* Handles uploading basic file types to server and makes the API call to "/uploadFormData" endpoint
- * with the mapping of guid to filem as parameters.
+ * with the mapping of guid to files as parameters.
*
* @param fileguidpairs the files and corresponding guids to be uploaded to the server
* @returns the response as a json from the server
@@ -52,8 +52,7 @@ export namespace Networking {
])
);
}
- // If the fileguidpair has a guid to use (From the overwriteDoc) use that guid. Otherwise,
- // generate a new guid.
+ // 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.
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 06b48fe96..c1abd6e71 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -1852,9 +1852,7 @@ export namespace DocUtils {
export async function uploadFilesToDocs(files: File[], options: DocumentOptions) {
const generatedDocuments: Doc[] = [];
- // UploadFilesToServer takes an array of FileGuidPairs,
- // but these files do not have overwriteDocs, so
- // we do not set guid, allowing the client to generate one.
+ // These files do not have overwriteDocs, so we do not set the guid and let the client generate one.
const fileNoGuidPairs: Networking.FileGuidPair[] = files.map(file => ({file}));
const upfiles = await Networking.UploadFilesToServer(fileNoGuidPairs);
@@ -1869,8 +1867,7 @@ export namespace DocUtils {
export function uploadFileToDoc(file: File, options: DocumentOptions, overwriteDoc: Doc) {
const generatedDocuments: Doc[] = [];
- // Since this file has an overwriteDoc, we can set the client tracking guid
- // to the overwriteDoc's guid.
+ // Since this file has an overwriteDoc, we can set the client tracking guid to the overwriteDoc's guid.
Networking.UploadFilesToServer([{file, guid: overwriteDoc[Id]}]).then(upfiles => {
const {
source: { name, type },