I need to save customized CSS
files into AWS S3 using paperclip, and load them back in html file using paperclip attachment url. So, the link
tag will looks something like:
<link rel = "stylesheet" href = "https://s3.us-east-2.amazonaws.com/....../theme.css20190126-23995-3w63v8.css?1548515496">
Loading the file in Firefox will show the following error in console:
The stylesheet https://s3.us-east-2.amazonaws.com/....../theme.css20190126-23995-3w63v8.css?1548515496 was not loaded because its MIME type, “text/plain”, is not “text/css”.
I tried using this solution and added .url(:default, timestamp: false)
to attachment url. However this give a wrong file url for browser and CSS file is not loaded.