0

Is there a possibility that we can upload the folders as Static Resources in Salesforce?

I am sure there should be way via Eclipse, by changing the MIME Type in the corresponding MIME Type. What should be the MIME Type in such case?

The requirement is because
- In perforce(or any SVN), we can modify and upload a single file, rather than zipping whole folder and upload it back

3 Answers 3

0

You will need to create a zip file out of the contents and then reference the path's when you access it:

i.e. if the zip is ../css/

Then you reference it as {!URLFOR($Resource.NameOfFile, '/css/file.css')}

You can package a collection of related files into a directory hierarchy and upload that hierarchy as a .zip or .jar archive

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_resources.htm

2
  • thanku Eric...The requirement is because.. In perforce(or any SVN), we can modify and upload a single file, rather than zipping whole folder and upload it back
    – ipradhansk
    Sep 22, 2015 at 13:01
  • Unfortunatly that is not the case with salesforce AFAIK but you could use a .jar file.
    – Eric
    Sep 22, 2015 at 13:02
0

You can upload a compressed folder (also referred to as a zip file), in which case all files and subfolders within can be individually addressed (e.g. /resource/myzip/images/logo.jpg). The mime type will be application/zip.

1
  • thanku sfdcfox...The requirement is because.. In perforce(or any SVN), we can modify and upload a single file, rather than zipping whole folder and upload it back
    – ipradhansk
    Sep 22, 2015 at 13:01
0

Yes you can upload the single data upto 5Mb as static resource and in an organization upto 250 MB of static resource. This can be in the either in the form of zip folder, jar files or as an image or document. for further knowledge you can just go through this link :- https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_resources.htm

Thanks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .