parse-community / parse-server-s3-adapter

AWS S3 file storage adapter for Parse Server
Other
80 stars 83 forks source link

Any way to upload gzipped file? #217

Closed ulitiy closed 1 year ago

ulitiy commented 1 year ago

We have too much traffic, is there any way to upload gzipped with encoding meta? DigitalOcean spaces don't compress on the CDN side unless you do that during the upload.

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

mtrezza commented 1 year ago

You could compress the file before uploading it.

I'm closing this as it does not seem to be a Parse Server S3 File Adapter issue.

ulitiy commented 1 year ago

@mtrezza Sure, but then I need to add a Content-Encoding header without "x-amz-meta-". Is that possible?

mtrezza commented 1 year ago

Not sure I fully understand your use case, maybe you could update your initial post with the provided template and fill out all the sections. Please add as many details as possible. Then we may re-open the issue.

ulitiy commented 1 year ago

For anyone interested, here's the implementation of Content-Encoding header.

Works well with DigitalOcean and other CDNs that don't encode themselves. Encode your file on the client and upload it to parse with meta contentEncoding: "gzip"