When you develop your APEX application using the APEX Listener or OHS, it is a good habit to create a separate (sub)folder to serve your images - and other files - into your application. Usually the name of the subfolder reflects the name of the application. So you reference these images, like an "enabled" image in your application by '#IMAGE_PREFIX#my-app/enabled.png'. So far so good.
But now you need to deploy this to a server that is using the Embedded PLSQL Gateway (EPG)? How to serve these images into that application without changing your code? Uploading the images the regular way into the workspace or application doesn't help, because you won't get the subdirectory prefix. The only way (I know of) is to upload these images into the XML-DB Repository.
So I created this script - feel free to use, edit or whatever you want to do with it (no guarantees!):
But now you need to deploy this to a server that is using the Embedded PLSQL Gateway (EPG)? How to serve these images into that application without changing your code? Uploading the images the regular way into the workspace or application doesn't help, because you won't get the subdirectory prefix. The only way (I know of) is to upload these images into the XML-DB Repository.
So I created this script - feel free to use, edit or whatever you want to do with it (no guarantees!):
Comments
That allows me to see the XDB file system as a top folder where I can create as many subfolders I want to using the normal client OS methods (in Mac OS X this works just great, I go to the Finder menu and then Go, specify the server name or ip address with the port if other than 80 and I'll get connected to the root XDB folder).
So, besides the usual "i" folder containing all the built-in apex stuff, I created my own folders that I can then reference from within Apex by using a custom substitution string.
Alternatively one can create a subfolder "myapp" of "i" and the reference #IMAGE_PREFIX#/myapp, as you described, but I find that less than desirable because it will get "renamed" along with "i" when you perform a major upgrade of Apex even if I don't need to change my app's images.
Please tell me if I mistook something.
Regards
Flavio
Marco