I want to give files from zip in static resource. How can i do it? It gives me 404 on getContent() anyway: with file ending(png,txt, etc) and without.
PageReference pageRef = PageReference.forResource('Zip','File.csv');
PageReference contentRef = new PageReference(pageRef.getUrl().split('\\?')[0]);
System.debug(contentRef.getContent());
Tried another way but same error.Link without File.csv is valid and i can download that file.
StaticResource sr = [SELECT Id,SystemModstamp FROM StaticResource WHERE Name = 'Zip'];
String srPath = '/resource/' + sr.SystemModstamp.getTime() + '/Zip/File.csv';
PageReference pg = new PageReference(srPath);
String body = pg.getContent().toString();