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