I want to save the user's posted images in the "privacy" folder in the same hierarchy, not in the public folder that anyone can see, and display it on the page.
Because webpacker is used, images under app/assets/images and public are described and displayed as follows.
<% = image_pack_tag 'xxxxx.png'%>
How can I display this image in the "privacy" folder at the same level as the public folder?
I don't know how to check it, but I didn't understand it.
It can be a useful site, so I would appreciate it if you could teach me how to do it.
Amazon Linux release 2 (Karoo)
Ruby version: 2.6.1
Answer # 1
I want to save it in the "privacy" folder on the same level and display it on the page.
Other than the
publicfolder cannot be accessed from the other side of the web, it is usuallynot displayable.
Make something that returns image data as a Rails controller and link it to it
Encode image file into Data URI and return the resultYou have to take a technique like
- ruby on rails - i want to display the posted images in a random order (get information from the record)
- ruby on rails - i want to display all the images in the [rails] directory in the browser!
- ruby on rails - i want to display the schedule with rails full calendar
- i don't know how to randomly extract images in c # and display them in picturebox
- nginx - [ruby on rails] i want to display the url of an html file placed in a public directory without a file name
- ruby on rails - i want rails to display google map
- ruby on rails 5 - i want to display ruby on rails error messages using a modal window
- vb - i want to display two pictureboxes on top of each other
- dart - flutter: i want to display "grid view" and other widgets together on the screen
- ruby on rails - i want to display the number of people in the group
- ruby - rails pagination function i want to display in alphabetical order
- ruby on rails - i want to display activehash in the view file with the corresponding character instead of id
- ruby on rails - [rails] about the display position after redirect by pressing like
- ruby on rails - i want to display a list of liked data
- python - i want to display db other than'default'of django with genericdetailview
- bootstrap display in ruby on rails is broken
- ruby on rails - how to manage good images with git in rails projects
- xcode - i want to display images using firebase storage with swift
- python 3x - i want to display two jpg images in python and display different images with the buttons
- ruby - i can no longer post images that were made with rails