Tuesday, September 13, 2011

Simple script to upload images into XML-DB (EPG)

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!):
Post a Comment