Vinelab / cdn

CDN Assets Manager Package for Laravel.
MIT License
214 stars 71 forks source link

Compress option to gzip compress files. #85

Open codenut opened 8 years ago

codenut commented 8 years ago

Thank you for creating this package! Is it possible to add a compress option that will gzip compress the files that will be uploaded in S3. The use case for this is that s3 doesnt automatically compress javascript,css,etc. assets and it would be nice this option can be added.

'compres' => ['css', 'js']

Mulkave commented 8 years ago

@codenut do you mean to automatically gzip before uploading? And upload the compressed files? We're not talking about minification here though, right?

codenut commented 8 years ago

@Mulkave yes, that is correct. Just gzip the file before uploading without minification. And also set the ContentEncoding to gzip.

Theres an implementation of it on the repository that I forked.

https://github.com/codenut/cdn/commit/204ffbbb30f249fd437e6422e2fa9e05101b2daa

Thanks!

Mulkave commented 8 years ago

@codenut cool! Can you please open a PR of your implementation?

uniring commented 7 years ago

+1 for this feature, can someone take a look at @codenut implementation?