Static resource bundling doesn't work in CE
I'm on IDEA 15 CE and I don't see the menu option to convert a static resource bundle. Not sure if this related to CE vs UE or if I'm just missing something.
Illuminated Cloud version 1.6.6.2-idea14
Comments (8)
-
repo owner -
reporter Scott -
That's the mime type Salesforce sets when you upload a zip file through the UI. Maybe IC could do some sort of trial extraction on these resources to see if they're zip files, and if it succeeds just change the MIME Type to application/zip and re-upload the meta file? Some sort of one-time fix.
If not, I would just add it to the docs somewhere that the MIME type needs to match a zip type and we'll just fix them as we find them.
-
reporter FWIW: Did some more digging and found this: https://developer.salesforce.com/forums/?id=906F000000095orIAA
It looks like SF might just use whatever the browser reports it as, which is inconsistent at best.
-
repo owner I'd prefer not to change a content type that's been purposefully set for some reason or another. I'll look at options to give the user the menu item anytime it even potentially should be available without setting the user up for an ugly error if it's not a good match.
-
repo owner That link helps, Nathen. I think rather than enable the option on static files with arbitrary content types, I'll enable them when the associated MIME type is specifically for an archive (I can test this reliably now) or the expressed content type is one of the known ones provided when uploading a static resource, in particular application/zip, application/x-zip-compressed, or application/octet-stream. I can expand that over time based on end user experience, but I'd prefer to start conservative to minimize errors.
-
repo owner This is implemented and will be in the next build. I've verified that if the underlying file isn't a valid zip archive, a reasonable error is presented to the user ("error in opening zip file") and no changes occur in the file system.
-
repo owner - changed version to 1.6.6.3
In 1.6.6.3 (for release tonight or tomorrow morning), you can now create static resource bundles from resources with content types: application/zip, application/x-zip-compressed, application/octet-stream.
-
repo owner - changed status to resolved
Delivered in 1.6.6.3.
- Log in to comment
Nathen, it's because of the content type of the resource in the meta.xml file. It needs to resolve to a zip file via the MIME type for the option to be enabled, e.g., application/zip. I can loosen that up if it's a real issue, but I didn't want to enable the option on arbitrary static resources where extraction would be guaranteed to fail.