From 62db650e3c279952d7a16d3c53614890b50e930b Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 10 Sep 2018 21:17:49 +0900 Subject: [PATCH] Revert "Fix bug" This reverts commit f3ab8199a53543f231cdf7c0678b331896b4a133. --- src/services/drive/add-file.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index a7a5ab572..d1c7051ab 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()}/${encodeURIComponent(name)}`; - const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}.thumbnail.jpg`; + const key = `${config.drive.prefix}/${uuid.v4()}/${name}`; + const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${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 }`;