bug fix in urltopath

This commit is contained in:
Aditya Patadia 2023-10-26 03:30:13 +05:30 committed by Shibo Lyu
parent 8623154efa
commit 8bd2130d0e

View file

@ -127,7 +127,8 @@ class S3Storage extends StorageBase {
// Doesn't seem to be documented, but required for using this adapter for other media file types.
// Seealso: https://github.com/laosb/ghos3/pull/6
urlToPath(url) {
return url;
const parsedurl = new URL(url);
return parsedurl.pathname;
}
async save(image: Image, targetDir?: string) {