From d55706b41454aba4d6ed08681e121db6bd5bba0e Mon Sep 17 00:00:00 2001 From: Aiden Vigue Date: Wed, 26 Jul 2023 13:24:00 -0400 Subject: [PATCH 1/2] add support for storing videos and files --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index bd024c7..323f0e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -124,6 +124,10 @@ class S3Storage extends StorageBase { return new S3(options) } + urlToPath(url) { + return url; + } + async save(image: Image, targetDir?: string) { const directory = targetDir || this.getTargetDir(this.pathPrefix) From 746f82f5936ee80102c3601a080c59de1750527d Mon Sep 17 00:00:00 2001 From: Shibo Lyu Date: Sun, 13 Aug 2023 12:59:55 +0800 Subject: [PATCH 2/2] doc: Add comment about urlToPath. --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 323f0e4..47c26d4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -124,6 +124,8 @@ class S3Storage extends StorageBase { 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; }