fix(medusa-interfaces, medusa-file-*): flag for streaming to a private bucket (#4771)

* wip: unify file service api

* fix: flag type

* fix: update Spaces service

* fix: S3/Spaces - default to private

* fix: MinIO `isPrivate` for `getPresignedDownloadUrl`, add `isPrivate` to `GetUploadedFileType`

* chore: changeset
This commit is contained in:
Frane Polić authored and GitHub committed 2023-08-22 13:05:30 +02:00
1 parent 80d603a63d
commit edf9ed4e59
5 files changed
+29 -14

No files matched your search

@@ -82,9 +82,13 @@ class DigitalOceanService extends AbstractFileService {
const pass = new stream.PassThrough()
// default to private
const isPrivate =
typeof fileData.isPrivate === "undefined" ? true : fileData.isPrivate
const fileKey = `${fileData.name}.${fileData.ext}`
const params = {
ACL: fileData.acl ?? "private",
ACL: isPrivate ? "private" : "public-read",
Bucket: this.bucket_,
Body: pass,
Key: fileKey,