I had a compressed static resource file with lots of styling and javascript files. I just downloaded that file and re-uploaded again but after uploading it no styling and javascript is getting loaded.
I am really frustrated at this problem because not able to figure out the why is this happening for 2 hours
Static resource i uploaded with name : NewResource MIME Type application/x-zip-compressed
My code :
<apex:page controller="NMAT_LoginContoller" showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" title="Register">
<head>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/bootstrap.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/bootstrap-datetimepicker.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/chosen.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/styles/scss/style.scss')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/styles/scss/vars.scss')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/style.css.map')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/fonts.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/style.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/vars.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.NewResource, 'assets/css/vars.css.map')}"/>
</head>
Rest of vf page
Best Answer
I had a similar issue where this became an issue. What you need to do instead of doing "Send To > Compressed (zipped) folder" on the folder, do it on the files inside the folder.
When you compress the folder itself, you end up with "foo.zip/foo/bar.js" instead of "foo.zip/bar.js".