Merge pull request #6 from acvigue/urltopath

Add support for storing videos and files
This commit is contained in:
Shibo Lyu 2023-08-13 13:01:45 +08:00 committed by GitHub
commit b59f3e1cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,12 @@ class S3Storage extends StorageBase {
return new S3(options) return new S3(options)
} }
// 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;
}
async save(image: Image, targetDir?: string) { async save(image: Image, targetDir?: string) {
const directory = targetDir || this.getTargetDir(this.pathPrefix) const directory = targetDir || this.getTargetDir(this.pathPrefix)