I have done a presentation on how attachments work in Oracle APEX. Most recently at the RMOUG 2014 training days conference in Denver. The presentation walks through several of the options for uploading, storing and presenting files to the user.
The packaged up the sample application and the presentation are now ready to share. The Desktop application is installable on APEX version 4.1.1 and later.
On the same vein, an attachment related issue was presented to me recently with regards to the APEX Mobile themes.
When using Mobile reports, if you want to show the contents of the attachment, it may be a challenge. There is an issue with attachments links generated by APEX that prevent them from being displayed when using the jQuery Mobile theme. The issue lies with the AJAX loading of the page before it is displayed. This will generate an page with the error message “undefined”.
This link was generated using a standard report BLOB column format.
There is a fix for this issue. The link needs to be generated with an attribute of either:
It is possible to generate the links another way, or to write your own download routine, but I think this is a good opportunity for jQuery to save us some time.
On my report page, I have included a small snippet of jQuery code to locate report links and add the rel=”external” attribute to the anchor tags inside reports.
Note: Template changes my require adjustment to this example. Review the classes assigned to rows in the report on the theme that you are using.
Reviewing the resulting link for the download should snow the attribute as part of the anchor tag. This should result in a successful attachment retrieval process on using the mobile theme.
Note: These examples were developed with APEX 4.2.5. Future versions may vary.