Upload svgs with MIME type image/svg+xml

Unfortunately there's no way to map extensions to MIME type. The s3cmd tool guesses wrong and uploads svgs with text/html.  Upload everything but svgs first, then upload only svgs using the correct MIME type.
This commit is contained in:
Ray Schamp 2016-05-20 11:36:10 -04:00
parent 8ded5cb267
commit 1322e25cc2

View file

@ -31,7 +31,8 @@ webpack:
$(WEBPACK) --bail
sync-s3:
$(S3CMD) sync -P --delete-removed --exclude '.DS_Store' ./build/ s3://$(S3_BUCKET_NAME)/
$(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' ./build/ s3://$(S3_BUCKET_NAME)/
$(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --default-mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/
sync-fastly:
$(NODE) ./bin/configure-fastly.js