summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-10 17:40:41 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-10 17:40:41 +0900
commitf3ab8199a53543f231cdf7c0678b331896b4a133 (patch)
tree038ef8541df31c955ef79846020ce7d7f07e0900 /src
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadmisskey-f3ab8199a53543f231cdf7c0678b331896b4a133.tar.gz
misskey-f3ab8199a53543f231cdf7c0678b331896b4a133.tar.bz2
misskey-f3ab8199a53543f231cdf7c0678b331896b4a133.zip
Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/services/drive/add-file.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts
index d1c7051ab0..a7a5ab5726 100644
--- a/src/services/drive/add-file.ts
+++ b/src/services/drive/add-file.ts
@@ -36,8 +36,8 @@ async function save(path: string, name: string, type: string, hash: string, size
if (config.drive && config.drive.storage == 'minio') {
const minio = new Minio.Client(config.drive.config);
- const key = `${config.drive.prefix}/${uuid.v4()}/${name}`;
- const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${name}.thumbnail.jpg`;
+ const key = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}`;
+ const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}.thumbnail.jpg`;
const baseUrl = config.drive.baseUrl
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`;