I have this line.
@organization.search_image = File.open(@photo.photo.path(:original))
Besides looking for something local, and all my photos are now on S3. How would I do to open a file on S3?
I think what you should do is upload / transfer the image to S3 and write it to a new file, and then use the new file.
open('newpic.png', 'w') do |file| S3Object.stream('pic.png', 'bucket_name') do |chunk| file.write chunk end end #Write the streamed file to newpic.png then use newpic.png.
You have two options that come to mind:
Source: https://habr.com/ru/post/1755597/More articles:Чтение и запуск файла Powershell из текста - fileDropdown menu with prototype.js in IE - javascriptSQL Magento Sales Report - sqlOEM Newbi: How to host a small Java application on a dedicated hardware platform? - javaIs there an open source .NET equivalent to the date.js library? - datejs regex escapes quotes - javascriptCruiseControl.NET - Project Does Not Exist - continuous-integrationTypedef declaration of template class - c ++Calculation of disk space that a string will occupy without saving to disk - stringHow to go through a tar.gz file containing zip files without extraction - pythonAll Articles