static resources - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Prathiba NambirajanPrathiba Nambirajan 

static resources

HI There ,

 WE have banner images stored in Static resources . I have a requirement to add one more new banner image to the same file . I am new to this . Can anyone pplease tell me how do I access that file and update with one more banner image 
Please
Appreciate your response

Thanks 
Best Answer chosen by Prathiba Nambirajan
Amnon KruviAmnon Kruvi
In your zip file, I can see a directory called BannerIcons. Can you place your new image inside that directory and then upload the new file back to Salesforce?

All Answers

Amnon KruviAmnon Kruvi
If your static resource is a zipped file, then you just need to download the existing file, add the new banner image to it, then upload it back to Salesforce. 
​​​​​​
If it isn't a zipped file, then you cannot add another image to the same static resource. You will need to either create a brand new resource, or replace the old one with a zip archive. If you do replace it, though, you'll need to change any component that uses this static resource so that it takes the banner image from inside the zip. 
Todd HalfpennyTodd Halfpenny
I'm making an assumption that your static resource is a zip file with the assets in, and if so then you can do the following;
  1. Go to the static resource detail page: Setup -> Custom Code -> Static Resource 
  2. Click on the name of the static resource you're interested in. This will take you to the detail page
  3. Download the existing zip file using the "View file" link
  4. unzip the file on your local computer, add the asset you want to the folder structure and re-zip
  5. Go back to the static resource listing page, and click "Edit" next to your entry.
  6. Upload the new zip file via the "Choose file" button.
Note, the above menu journey if for LEX, classic is something like "Setup -> Create -> Static Resources" IIRC.
 
Prathiba NambirajanPrathiba Nambirajan
Thank you Amnon and Todd .I will try these options  if not I will post some images again.Really appreciate your prompt response 
Prathiba NambirajanPrathiba Nambirajan
static resources
Prathiba NambirajanPrathiba Nambirajan
Hi There,
I have joined recently and I dont  any documentation for these .  I ahve been asked to add another image . If I click the view file, it gets downloaded . I have two files . In which one I should add the image . Please help me .

 
Amnon KruviAmnon Kruvi
In your zip file, I can see a directory called BannerIcons. Can you place your new image inside that directory and then upload the new file back to Salesforce?
This was selected as the best answer
Prathiba NambirajanPrathiba Nambirajan
Thank you so much Amnon. It worked. Much appreciate your timely help and response