mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 21:33:08 +02:00
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
This commit is contained in:
commit
8233f86181
1 changed files with 6 additions and 0 deletions
|
@ -50,6 +50,12 @@ async function save(file: DriveFile, path: string, name: string, type: string, h
|
|||
if (type === 'image/vnd.mozilla.apng') ext = '.apng';
|
||||
}
|
||||
|
||||
// 拡張子からContent-Typeを設定してそうな挙動を示すオブジェクトストレージ (upcloud?) も存在するので、
|
||||
// 許可されているファイル形式でしか拡張子をつけない
|
||||
if (!FILE_TYPE_BROWSERSAFE.includes(type)) {
|
||||
ext = '';
|
||||
}
|
||||
|
||||
const baseUrl = meta.objectStorageBaseUrl
|
||||
|| `${ meta.objectStorageUseSSL ? 'https' : 'http' }://${ meta.objectStorageEndpoint }${ meta.objectStoragePort ? `:${meta.objectStoragePort}` : '' }/${ meta.objectStorageBucket }`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue