diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-08 16:03:17 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-08 16:03:17 +0900 |
| commit | ec1f2a285b21851dcacae42d306a71de134860b7 (patch) | |
| tree | 1feea5f380a632759f89af14470b730f3653af86 /src/services | |
| parent | Allow only one kind of date identifier at once (#5120) (diff) | |
| download | sharkey-ec1f2a285b21851dcacae42d306a71de134860b7.tar.gz sharkey-ec1f2a285b21851dcacae42d306a71de134860b7.tar.bz2 sharkey-ec1f2a285b21851dcacae42d306a71de134860b7.zip | |
Resolve #5116
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/drive/add-file.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index 2f0d5d6265..52339a2f2a 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -71,7 +71,7 @@ async function save(file: DriveFile, path: string, name: string, type: string, h ]; if (alts.webpublic) { - webpublicKey = `${meta.objectStoragePrefix}/${uuid.v4()}.${alts.webpublic.ext}`; + webpublicKey = `${meta.objectStoragePrefix}/webpublic-${uuid.v4()}.${alts.webpublic.ext}`; webpublicUrl = `${ baseUrl }/${ webpublicKey }`; logger.info(`uploading webpublic: ${webpublicKey}`); @@ -79,7 +79,7 @@ async function save(file: DriveFile, path: string, name: string, type: string, h } if (alts.thumbnail) { - thumbnailKey = `${meta.objectStoragePrefix}/${uuid.v4()}.${alts.thumbnail.ext}`; + thumbnailKey = `${meta.objectStoragePrefix}/thumbnail-${uuid.v4()}.${alts.thumbnail.ext}`; thumbnailUrl = `${ baseUrl }/${ thumbnailKey }`; logger.info(`uploading thumbnail: ${thumbnailKey}`); @@ -104,8 +104,8 @@ async function save(file: DriveFile, path: string, name: string, type: string, h return await DriveFiles.save(file); } else { // use internal storage const accessKey = uuid.v4(); - const thumbnailAccessKey = uuid.v4(); - const webpublicAccessKey = uuid.v4(); + const thumbnailAccessKey = 'thumbnail-' + uuid.v4(); + const webpublicAccessKey = 'webpublic-' + uuid.v4(); const url = InternalStorage.saveFromPath(accessKey, path); |