APEX allows you to embed static web files (CSS, JS, images, etc) into your application. This functionality removes the need to store web files on a web server which is required for some applications.
To upload your file into the application go to Shared Components > Static Files. Click the Create button. On the Create page you can upload a file and either associate the file to a specific application or no application.
Files that are not associated with a specific application are available to all the applications within the workspace and can be referenced (most likely in a page template) using the #WORKSPACE_IMAGES# substitution string. Ex: #WORKSPACE_IMAGES#test.js
Files that are added to the application aren't stored on the web server. They are stored in the database. For high traffic applications this may not be a great idea and you may want to look at storing them on a web server.
Part 2 of the series will cover how to include the files in a installation script.
I had some issues with storing files in the database (#WORKSPACE_IMAGES#), mainly .js and .css files. My created pages (customized theme) were loading too slow. But by moving them to the /i/ folder this slow loading was fixed.
ReplyDeleteVery interested in how this article contintues.
Raoul