diff options
| author | James Hu <51237606+jameshu111@users.noreply.github.com> | 2023-06-07 12:30:53 -0400 |
|---|---|---|
| committer | James Hu <51237606+jameshu111@users.noreply.github.com> | 2023-06-07 12:30:53 -0400 |
| commit | 27f518632c24f69fff360bef36eb0e5426167b83 (patch) | |
| tree | 71492c349701dec34d5c3b2c3a1429c388e0494a /src/client/util | |
| parent | 32b3261ae97a6d9c3c9e4c026dcd16bea61b3d73 (diff) | |
Update other uses
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/Import & Export/DirectoryImportBox.tsx | 2 | ||||
| -rw-r--r-- | src/client/util/ReportManager.tsx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx index b9bb22564..1a4c2450e 100644 --- a/src/client/util/Import & Export/DirectoryImportBox.tsx +++ b/src/client/util/Import & Export/DirectoryImportBox.tsx @@ -112,7 +112,7 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> { sizes.push(file.size); modifiedDates.push(file.lastModified); }); - collector.push(...(await Networking.UploadFilesToServer<Upload.ImageInformation>(batch))); + collector.push(...(await Networking.UploadFilesToServer<Upload.ImageInformation>(batch.map(file =>({file}))))); runInAction(() => (this.completed += batch.length)); }); diff --git a/src/client/util/ReportManager.tsx b/src/client/util/ReportManager.tsx index 51742d455..4c1020455 100644 --- a/src/client/util/ReportManager.tsx +++ b/src/client/util/ReportManager.tsx @@ -173,7 +173,7 @@ export class ReportManager extends React.Component<{}> { // upload the files to the server if (input.files && input.files.length !== 0) { const fileArray: File[] = Array.from(input.files); - (Networking.UploadFilesToServer(fileArray)).then(links => { + (Networking.UploadFilesToServer(fileArray.map(file =>({file})))).then(links => { console.log('finshed uploading', links.map(this.getServerPath)); this.setFileLinks((links ?? []).map(this.getServerPath)); }) |
