diff options
| author | kimdahey <claire_kim1@brown.edu> | 2019-11-03 17:07:18 -0500 |
|---|---|---|
| committer | kimdahey <claire_kim1@brown.edu> | 2019-11-03 17:07:18 -0500 |
| commit | b1e9619a4e04a9784d927c766361d734f549d6c5 (patch) | |
| tree | 36b875ccc0c45c3706d2533c4c28cc1492b38ce5 /src/server/apis/google/GooglePhotosUploadUtils.ts | |
| parent | b2777f92b50f926357ad9b595c7907368b996fbd (diff) | |
| parent | 2786a2e4b33ff874f320697b89fecec3105df201 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into webcam_mohammad
Diffstat (limited to 'src/server/apis/google/GooglePhotosUploadUtils.ts')
| -rw-r--r-- | src/server/apis/google/GooglePhotosUploadUtils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/apis/google/GooglePhotosUploadUtils.ts b/src/server/apis/google/GooglePhotosUploadUtils.ts index 16c4f6c3a..4a67e57cc 100644 --- a/src/server/apis/google/GooglePhotosUploadUtils.ts +++ b/src/server/apis/google/GooglePhotosUploadUtils.ts @@ -4,6 +4,7 @@ import * as path from 'path'; import { MediaItemCreationResult } from './SharedTypes'; import { NewMediaItem } from "../../index"; import { BatchedArray, TimeUnit } from 'array-batcher'; +import { DashUploadUtils } from '../../DashUploadUtils'; export namespace GooglePhotosUploadUtils { @@ -32,6 +33,9 @@ export namespace GooglePhotosUploadUtils { }; export const DispatchGooglePhotosUpload = async (url: string) => { + if (!DashUploadUtils.imageFormats.includes(path.extname(url))) { + return undefined; + } const body = await request(url, { encoding: null }); const parameters = { method: 'POST', |
