Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support uniform bucket-level access #20

Open
dpkirchner opened this issue Mar 30, 2020 · 4 comments
Open

Support uniform bucket-level access #20

dpkirchner opened this issue Mar 30, 2020 · 4 comments

Comments

@dpkirchner
Copy link

The library cannot use GCS buckets configured to use bucket-level access. Attempts to use it will result in an exception: Cannot insert legacy ACL for an object when uniform bucket-level access is enabled.

Removing the predefinedAcl stream options key resolves this, although I'm not sure how you'd want to handle that generally.

@shinjanxp
Copy link

I found a workaround to this issue by passing a blank object as the acl property while calling multerGoogleStorage.storageEngine() from my app code without modifying the library. Apparently this causes the predefinedAcl property to be ignored by GCS

const upload = multer({
  storage: multerGoogleStorage.storageEngine({
    acl:{},
    filename: (_req, file, cb) => { cb(null, `/${new Date().getTime()}-${file.originalname}`); }
  })
});

Looking forward to a proper fix to this issue since many people could be affected by it.

@manuel-dancingly
Copy link

@shinjanxp how does that work for you? acl is not in the ConfigurationOption parameter on my end ...

image

@ZeroCho
Copy link

ZeroCho commented Mar 10, 2022

@manuel-dancingly
Too late reply but for those who has same issue, use multer-cloud-storage package instead and it has uniformBucketLevelAccess prop.

uniformBucketLevelAccess: true

@mufidu
Copy link

mufidu commented Oct 1, 2024

@manuel-dancingly Too late reply but for those who has same issue, use multer-cloud-storage package instead and it has uniformBucketLevelAccess prop.

uniformBucketLevelAccess: true

This helped me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants