Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, stylesheets, JavaScript, and other files.

learn more… | top users | synonyms

0
votes
1answer
32 views

How to use IBM java jar files in apex or Visualforce?

I am trying to incorporate IBM JAR files in apex or Visualforce in order to make an API call? Should I be storing the JAR file folder in static resources? If yes, is there a way to utilize the java ...
1
vote
0answers
14 views

LockerService causes access error when managed package component tries to load js from its static resource

I turned on LockerService to test our Lightning components and I get the following error when loading a page. Our component is trying to load a .js file from its own static resource and it throws the ...
2
votes
2answers
35 views

Referencing an image from a javascript file, both inside a static resource

Inside a Visualforce page, I have a static resource (MyResource.zip) which contains the following: scripts/Script.js img/iconoTP.gif I'm using the Chrome notifications API to show desktop ...
18
votes
1answer
162 views

Summer '16 appends orgId query string to certain static resources

I have just noticed something very worrying with the represented path to static resource files in Visualforce pages in Summer '16 boxes (sandbox and dev pre-release checked). It seems that for some ...
0
votes
1answer
47 views

How to upload application/javascript file in static resource

I created a JS file and uploaded to static resources in Salesforce. It identifies the mime type as application/x-javascript. So unable to open the file in Dev console, because it support application/...
0
votes
1answer
33 views

How to use static Resource images in static Resource javascript

How to use static Resource images in static Resource java script, <img class="canceluploadicon" src="EasyResources.zip/images/closeIcon.png" alt="cancel" width="30"></a></div>'); ...
0
votes
1answer
40 views

How to add custom label in static resource JS alert

How to add custom label in static resource JS alert , i want to create a alert error message using a custom label in static resources
3
votes
2answers
90 views

How can I refer a static resource containing js inside javascript on a visualforce page

I have a zipped static resource uploaded in my salesforce org which contains different types of js . I want them to be referred in my script on visualforce page. How can I do this?
0
votes
0answers
20 views

How to add custome label for html code which is in static resources [duplicate]

How to add custom label for cancel button in below html code which is in static resources $j('#progressBox').append(fileName + '<div class="progress"><div id="' + progressBarId + '" class="...
0
votes
1answer
22 views

Image size control in VF Page

I have below page where I want to reduce the image size but the height and width is not working here. It is not controllable and occupies the whole page area. Can someone let me know how to control it?...
2
votes
1answer
37 views

Way to use relative URL vs hard coding document ID?

How can you use a relative URL for an image file inside documents vs hard coding the document ID in HTML? I have an org to spin off templates that use images with the src linked to the document ID, ...
1
vote
0answers
42 views

View a PDF and TXT file from within an HTML static resource

So i have created a website in pure HTML 5, with some css's, jquery's and modals and locally on my PC it's all working great. I have some PDF and TXT files that i want to be able to view and it's ...
0
votes
0answers
42 views

Issue with same Static Resource references on two different Salesforce server instances

We have a VF page that uses the 'best practice' method of referencing some JS and CSS files, via a static resource. One resides on server CS17, the other on CS86 (both Sandbox instances). On both ...
0
votes
1answer
110 views

Formula Field - Image from zipped static resource

I need some help with a Formula Field (please don't send me visualforce code) image. I am trying to get the image from a zipped static resource. BCIGraphics is the zip file. Here is what I have ...
1
vote
0answers
73 views

Bootstrap static resource is not applying to page

This is the VF page I am trying to style <apex:page showHeader="true" sidebar="false" controller="ComposeEmailController"> <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'sf-bootstrap/...
4
votes
1answer
47 views

Bad practice to invoke RemoteAction on page load? From Static Resource?

I'm working with a page that is a container for a single page app. <apex:page> <div id="root"></div> <script src="{!URLFOR($Resource.javascriptResource)}"></script&...
1
vote
1answer
65 views

Problem linking to a static resource image

I went through a lot of threads of people explaining how to link to a static resource image in your CSS. My code looks fine to me, yet it doesn't work. I have put the css file in a folder together ...
1
vote
1answer
27 views

How to make org “tour”?

Can anyone give guidance on how to implement something like http://usablica.github.io/intro.js/ in a salesforce org? WalkMe is not an option, but trying to achieve something similar. To make my ...
0
votes
1answer
31 views

Bulk Testing with Static Resources

Our team is integrating static resources into our unit tests and were not sure about bulk testing. I have a couple of questions: Would bulk testing be done through code or through adding additional ...
0
votes
0answers
51 views

Datepicker using Static resource

I have used the below code for the compatibility of browsers for displaying the date picker and its working fine <script src="//cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script> &...
3
votes
2answers
249 views

accessing static resource in apex

I know that we can access static resources in visualforce page as follows; {!URLFOR($Resource.UploadTemplate)} How can we access the static resource in APEX class? And if it is in a zip file, how ...
0
votes
2answers
60 views

How to download/extract Static resources files which is already available in Salesforce

I want to download the static resource files from one of the salesforce environment and need to upload those static resource files into another Salesforce environment, But I don't see any options to ...
0
votes
1answer
49 views

Can I upload this SalesforceSans font as a static resource and then call it in a VF page?

I've downloaded the Lightning Design System and I'd like to just upload the SalesforecSans font to my dev org for now, preferably as a static resource. Is this possible? How would I then call this ...
0
votes
1answer
34 views

Import CSS not working in Static Resource

I am trying to import CSS within a CSS file, from a static resource folder. But it shows an error and none of the style in displayed on page. Also, the folder is not displayed in Source folder in ...
2
votes
0answers
41 views

Using static resource in test class in order to test HTTP callout. Seems broken after update 1st of january [closed]

I'm using static resource in the code below to mock a httpcallout response. It seems like the update 1st of january did break the link - has anyone else experienced same issues? My question is then -...
6
votes
1answer
282 views

AJAX load JSON from static resource

I am trying to load a JSON file into my VF app via AJAX. It currently sits in a zipped static resource, like such: myResources | |js | |target.json ...
0
votes
2answers
85 views

Getting an image from a salesforce url using an apex controller

I am trying to get an image located at https://na1.salesforce.com/servlet/servlet.FileDownload?file=00P24000002sSRUEA2 in an apex controller and it complains about authorization..Below is my code ...
0
votes
2answers
74 views

Static Resource Conditional Image Display in PageBlockTable

This is the name and path of Static Resource (ComplianceImage.Zip) File "ComplianceImages/Yes.png" , "ComplianceImages/No.png" etc..I am unable to display image in column. Pls help <apex:column ...
1
vote
3answers
219 views

Can we include the js file and css file in visualforce components?

Here is my scenario, I want to include the css and js file, these are stored in static resources. I need the syntax and how to use these classes and styles defined in css file.
3
votes
1answer
901 views

How can I load an image in lightning without including the namespace?

I'm trying to include an image that I loaded as a static resource in a Lightning component. The image doesn't show up if I don't include my namespace. For example, this won't work: <img src="/...
1
vote
1answer
35 views

Is it possible to set the HttpMethod with MultiStaticResourceCalloutMock

I utilize a rest API from our vendor that has the same endpoint but utilizes different Httpmethods (get,put,post,delete). Is it possible to set the HttpMethod when setting up the endpoint as well?
0
votes
1answer
61 views

Javascript Static Resource Cannot Be Found

I feel like this is a dumb questions but I'm in circles right now trying to figure out what I'm missing. I added a javascript static resource to a folder called VisualForceElements like so: Then ...
3
votes
2answers
57 views

Visualforce page shows CSS errors for the same styling used by a html template

I downloaded a free html responsive template from the web and trying to convert it to a visualforce page. The page I am trying to reproduce is blank, so there is no content except css, js and nav bar. ...
0
votes
2answers
71 views

Re-routing to Static Resources with Site's UrlRewriter resulting in 404

Our public website has some links to downloadable PDFs. We'd like to use "pretty" URLs, but for some reason we're getting a 404 error when using the Site's UrlRewriter. The resource itself is ...
-1
votes
3answers
113 views

How to upload a folder as a Static Resource instead of Zip

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 ...
0
votes
2answers
93 views

How to refer my static resource zip file ( CSS & Img) in VF Page?

I have a Static Resource (Hardcoded URL) and a VF page for that. I want to get rid of the hard coded values and refer the static resource in my VF page. In order to do that i created a zip file of ...
5
votes
2answers
196 views

Accessing Visualforce static resources from local machine

FINAL UPDATE: just in-case if anybody else is looking the error message solution which I was getting is due to the fact that: When you get a share link, the link points to a web page that displays ...
3
votes
1answer
71 views

Files in zipped static resource return 404 errors after being updated

After saving a change to a file in a zipped static resource, all of the files in that static resource return 404 errors. If the changed files that caused the problem are added to another zipped static ...
-1
votes
3answers
653 views

How to use google material icons as static resource

I'm stuck with using Google Material Icons as static resource in Visualforce page. Using CDN i am able to see the desired results but can't get it done via static resource approach. So far i followed ...
1
vote
1answer
193 views

How to get page's static resource URL string using JavaScript code?

I want to get URL string of Salesforce static resource in JavaScript code. Something like: var url = getURL('static_resource_name') Is there a method to capture this from a page using JS?
0
votes
1answer
291 views

Create static resource with apex code

Is there a way to create a StaticResource within a Apex code. this the code i am doing: StaticResource sr = new StaticResource(); sr.Body = file; sr.Name = 'testLicence'; ...
0
votes
2answers
78 views

What is the difference between static resource and visualforce components?

I know the hardcoded scripts and style codes can be stored in static resource and vf components and can be used in vf page. But what can be the exact difference between these two since both are doing ...
8
votes
2answers
372 views

Access Custom Setting global variable from Static Resources

"{!$Setup.MyCustomSet__c.URL__c}"; I'm using the above to access custom setting on the page. But when I move the script to static resources and try to access it from there the value is not being ...
1
vote
1answer
69 views

How to use javascript in static resources and then to refer in VF Page?

This the VF page code : <script> $(document).ready(function() { // SUCCESS AJAX CALL, replace "success: false," by: success : function() { ...
0
votes
0answers
25 views

Use image from Static Resources as App Logo [duplicate]

Is it possible to reference an image in static resources as an App Logo, instead of having to reference a file uploaded to Documents? What I'm trying to do is remove any and all metadata dependencies ...
-1
votes
1answer
236 views

use javascript function in list button onclick javascript

In a List button, i execute javascript code, and for this i defined a static resource where i implemented some functions and i included my resource this way : {!REQUIRESCRIPT('/resource/...
1
vote
0answers
52 views

Mavensmate - Deploy only changes to static resource

I am currently having trouble with deploying static resource using mavensmate. I have a static resource with a lot of images. But the only thing I'm changing is the CSS and every time I deploy the ...
1
vote
1answer
53 views

Static resource naming convention

Is it a good practice to include version information along with the name when you are uploading a static resource. For example, I am uploading a file "Bootstrap-3.3.5.zip" in static resource, Shall I ...
5
votes
1answer
93 views

Does SFDC serve the entire zip static resource, or just the resources referenced?

When I inspect a page in Chrome/Firefox, I don't see the entire zip file as a requested resource. Only the files referenced are served to the client side. Does SFDC unzip resources server-side before ...