aboutsummaryrefslogtreecommitdiff
path: root/src/server/ApiManagers/GooglePhotosManager.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-11-27 04:25:55 -0500
committerSam Wilkins <samwilkins333@gmail.com>2019-11-27 04:25:55 -0500
commitdb6d3f77b1b429c1942019b79c44e378eb8b1ee4 (patch)
tree6730e54a0f31437699e807d753a8d1f0b2556c98 /src/server/ApiManagers/GooglePhotosManager.ts
parentdf5584ccd40bd83f1362b32db67969e7ffbf2e3f (diff)
fixed google photos upload by appending size suffix
Diffstat (limited to 'src/server/ApiManagers/GooglePhotosManager.ts')
-rw-r--r--src/server/ApiManagers/GooglePhotosManager.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/ApiManagers/GooglePhotosManager.ts b/src/server/ApiManagers/GooglePhotosManager.ts
index 5a709688b..4a0c0b936 100644
--- a/src/server/ApiManagers/GooglePhotosManager.ts
+++ b/src/server/ApiManagers/GooglePhotosManager.ts
@@ -5,7 +5,7 @@ import { GoogleApiServerUtils } from "../apis/google/GoogleApiServerUtils";
import { BatchedArray, TimeUnit } from "array-batcher";
import { GooglePhotosUploadUtils } from "../apis/google/GooglePhotosUploadUtils";
import { Opt } from "../../new_fields/Doc";
-import { DashUploadUtils } from "../DashUploadUtils";
+import { DashUploadUtils, InjectSize, SizeSuffix } from "../DashUploadUtils";
import { Database } from "../database";
const authenticationError = "Unable to authenticate Google credentials before uploading to Google Photos!";
@@ -55,7 +55,7 @@ export default class GooglePhotosManager extends ApiManager {
for (let index = 0; index < batch.length; index++) {
const { url, description } = batch[index];
const fail = (reason: string) => failed.push({ reason, batch: completedBatches + 1, index, url });
- const uploadToken = await GooglePhotosUploadUtils.DispatchGooglePhotosUpload(token, url).catch(fail);
+ const uploadToken = await GooglePhotosUploadUtils.DispatchGooglePhotosUpload(token, InjectSize(url, SizeSuffix.Original)).catch(fail);
if (!uploadToken) {
fail(`${path.extname(url)} is not an accepted extension`);
} else {