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 details page
- ruby - i can no longer post images that were made with rails
- ruby on rails - failed to display on the console even if the incremental search url is specified
- i want to display in detail the images displayed in the list when transitioning from the list to the detail page in recyclerview
- python - i want to display a list of images with djangon's listview, but i can't
- php - i want to display the images registered in advanced custom fields on the term list page with wordpress
- i want to display both reorderablelist and other properties in the inspector [unity]
- ruby on rails - images uploaded on heroku disappear over time amazon s3
- ruby on rails - i want to display in a list the posts that the user has liked
- [ruby on rails] cannot display pdf on smartphone
- html - i want to display the usernames of people who like rails
- ruby on rails 5 - the display of time_select does not work
- ruby on rails - i want to display the mail transmission screen with rails
- i want to display the list of posted images normally in ruby!
- python 3x - i want to display two jpg images in python and display different images with the buttons
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- python 3x - typeerror: 'method' object is not subscriptable
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - unresolved reference comes out in kotlin