aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/util/Import & Export/DirectoryImportBox.tsx5
-rw-r--r--src/server/index.ts2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx
index a625e06c0..93ab5cb3b 100644
--- a/src/client/util/Import & Export/DirectoryImportBox.tsx
+++ b/src/client/util/Import & Export/DirectoryImportBox.tsx
@@ -19,6 +19,7 @@ import { List } from "../../../new_fields/List";
import { Cast, BoolCast, NumCast } from "../../../new_fields/Types";
import { listSpec } from "../../../new_fields/Schema";
import { GooglePhotos } from "../../apis/google_docs/GooglePhotosClientUtils";
+import { SchemaHeaderField } from "../../../new_fields/SchemaHeaderField";
const unsupported = ["text/html", "text/plain"];
interface FileResponse {
@@ -147,7 +148,8 @@ export default class DirectoryImportBox extends React.Component<FieldViewProps>
if (docs.length < 50) {
importContainer = Docs.Create.MasonryDocument(docs, options);
} else {
- importContainer = Docs.Create.SchemaDocument([], docs, options);
+ const headers = ["title", "size"].map(key => new SchemaHeaderField(key));
+ importContainer = Docs.Create.SchemaDocument(headers, docs, options);
}
await GooglePhotos.Export.CollectionToAlbum({ collection: importContainer });
importContainer.singleColumn = false;
@@ -200,7 +202,6 @@ export default class DirectoryImportBox extends React.Component<FieldViewProps>
metadata.splice(index, 1);
}
}
-
}
}
diff --git a/src/server/index.ts b/src/server/index.ts
index eea467eec..b18059053 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -863,7 +863,7 @@ app.post(RouteStore.googlePhotosMediaUpload, async (req, res) => {
return newMediaItems;
};
- const newMediaItems = await mediaInput.convertInBatchesAtInterval(25, dispatchUpload, 3);
+ const newMediaItems = await mediaInput.convertInBatchesAtInterval(25, dispatchUpload, 1);
if (failed) {
return _error(res, tokenError);