2
votes

I have a page in APEX that uses many external images. I loaded all of the images for that page into a separate folder in Static Application Files under Shared Components and I am just referencing those on the page. I am not sure I like it as it looks messy when you open Static Application Files. It was suggested to me to load the images onto the SharePoint and access them using URL from APEX but that also does not seem like a good solution - URLs are very long and make the code messy. Another option would be to host them on application server. I am trying to figure out the best way and would love to hear some suggestions. Thank you in advance for your valuable input

4
I would never include URLs (paths) in the code, put the "base URL" in an application attribute and refer to that everywhere. That way you can move the images wherever you want, and you only need to update one thing. - Jeffrey Kemp

4 Answers

2
votes

Another option is to store them into BLOB columns in a table within the database.

  • Pro:
    • they are backed up along with the rest of your data
    • Apex is happy when displaying such data (I mean, it is a simple task to do that, whether you're displaying them in an interactive report, classic report, form ...).
  • Contra:
    • database size grows
1
votes

If the "messiness" of the list in Static Application Files concerns you, you could save some report filters:

  1. Report "Folder XXX images":

File Name like 'xxx/%'

  1. Report "Other files":

File Name not like 'xxx/%'

0
votes

You can read the file names list them in the application and when the users "selects" you can load the file by loading a BLOB in the database. In my case I do that by invoking a custom OS Job that lets me do that.

0
votes

We had a similar problem as we had a feature where users had to upload images and went with loading the images into the DB at first.

In order to retrieve them we used the APEX REST service and it worked fine enough.

Once we also had to store videos though and had to make them available on mobile as well,we went with a shared network storage and just put the file names into the database.

Either of these options should reduce "messiness" and work fine.