aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-09-08 15:40:25 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-09-08 15:40:25 -0400
commit8c28206b7c61402bf76f9b7e747b31ae44d5090b (patch)
treee3a83c1d68ddfd4a8ed7ad5424f5d425b85caa23 /src
parent65e5366f59ef2933460aafdc98790f42611f149f (diff)
tweak
Diffstat (limited to 'src')
-rw-r--r--src/client/util/Import & Export/DirectoryImportBox.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx
index 35d6e3c60..ab2801ee3 100644
--- a/src/client/util/Import & Export/DirectoryImportBox.tsx
+++ b/src/client/util/Import & Export/DirectoryImportBox.tsx
@@ -102,7 +102,9 @@ export default class DirectoryImportBox extends React.Component<FieldViewProps>
method: 'POST',
body: formData
}).then(async (res: Response) => {
- (await res.json()).map(action((file: any) => {
+ let names = await res.json();
+ console.log(names);
+ await Promise.all(names.map((file: any) => {
let docPromise = Docs.Get.DocumentFromType(type, Utils.prepend(file), { nativeWidth: 300, width: 300, title: dropFileName });
docPromise.then(doc => {
doc && docs.push(doc) && runInAction(() => this.remaining--);