diff options
author | James Hu <51237606+jameshu111@users.noreply.github.com> | 2023-06-07 12:47:51 -0400 |
---|---|---|
committer | James Hu <51237606+jameshu111@users.noreply.github.com> | 2023-06-07 12:47:51 -0400 |
commit | 09467c6c7ba208c4be22ee45bd4c94326e9c427b (patch) | |
tree | 677ff457062593c74c5f4c9f3c3c0e77040eb0b2 /src | |
parent | b2c0855d6d701bd80666e0693bd193dc69efb4a0 (diff) |
update comments
Diffstat (limited to 'src')
-rw-r--r-- | src/client/Network.ts | 5 | ||||
-rw-r--r-- | src/client/documents/Documents.ts | 7 |
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 }, |