aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-09-14 03:31:20 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-09-14 03:31:20 -0400
commit4f382d9629fbfdf6502782bbb8f39dba06ae51fa (patch)
tree4a22726b55a002b3ecee0c1eb8e364691ee0257e /src
parent10f77ee4cc03b3cf4356ebb645432c4b53fe8ede (diff)
added header fields and lowered upload threshold
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);