I'm trying to figure out a way to display images from a mounted file system that is not under RAILS_ROOT (in RedHat or Ubuntu environments). I don't want to use a symbolic link because this app is actually deployed through Tomcat, and Tomcat tries to follow the symbolic link and delete all the images in the mount when I shut down Tomcat. Putting the images under public/images is also not an option due to the number and size of these files.
I looked into send_file, but that will just display the one image. I need to display 6 requested images in a nicely formatted page. I would prefer not to use Base64 encoding because of the bloat, but I don't know how else to pass the image data down with the rendered page.
Again, the issue is that the images cannot be accessed via url in the generated HTML, the image data must be passed down with the rest of the page. I know that creating some type of service to server up the images would be the best way to handle this, but right now I just need to get this working.
Any help greatly appreciated!
See Question&Answers more detail:os