Product thumbnail disappeared after uploaded later in Heroku - heroku

I thought it all done setup Spree 3.1 in Heroku. But after successful upload product which shown thumbnail add to existing sample. The thumbnail later disappeared.

Pushed to run in Heroku only half way. Since Heroku is only read only storage when started. To upload pictures, it need additional services. In my case use AWS S3 from Amazon. And also need extra gems: Imagemagick, Paperclip to make thumbnails.

Related

How to fetch newly added images from VM in google cloud platform?

When I add images it is stored inside google cloud platform VM correctly.
But I am not able to fetch newly added images in my website.
If I redeploy project with newly added images in assets folder it is showing correctly.
I have verified there is no mistake on frontend or backend side.
Is it not possible to get live image update with VM?
Edit:
I have used Vue.js.
I am storing images inside src/assets folder.
When I save images in my website it is saved at src/assets folder.
I think it can only access things in dist folder after build.
Can you suggest where should I save my file?
I'm making an educateg guess it's some cache issue.
Instead of putting your image files inside the VM you can try storing them in a bucket that's accessible to public. The downside is that it can serve only static files (no PHP or anything).
You have to configure your load balancer to forward all your.domain.com/images/ requests to the bucket but that's actually quite easy. Have a look at my answer asking for such configuration.

Uploading files to a Heroku website connected to GitHub?

I'm making a pretty simple website and I have a feature that allows users to upload an image for their profile which is then saved in an uploads directory.
It seems to work fine, however when I push a new local version of the site out I lose all the uploaded files. I'm not exactly sure where Heroku stores them, is there a way I can push those to GitHub or another solution?
It seems like you want data from heroku app to your repository, if i understood your question correctly. Then try this:
https://blog.heroku.com/push_and_pull_databases_to_and_from_heroku
Heroku's filesystem is ephemeral. If you want to store user uploaded content, you need to use something like S3 to store the files.

Heroku pictures

I'm trying to get my pictures to upload on Heroku and have been unsuccessful. I have changed the
config.serve_static_assets = false
to
config.serve_static_assets = true
I have also looked through the Heroku manual and it is very unclear about this issue at least to me.
Does anyone have an idea how to get it to work?
I appreciate the help
Heroku is the wrong place to store you uploaded images they recomend using a system like Cloudinary that stores the images in the AWS (Amazon Web Services).
Ryan Bates has a really good video on how to upload images as well Carrierwave file uploads

Amazon S3 bucket images return 403 error

I've just inherited a rails site hosted on heroku using S3 for storage of images uploaded with the paperclip gem and suddenly most images are returning 403 errors. Looking at the bucket through the management console, I don't see the files listed even.
The images are uploaded through the ckeditor wysiwyg plugin, and it looks like they should be inside a folder named 'rich', but no such folder exists within the bucket. Not all files are missing (though some that were throwing a 403 are now showing up on the site correctly without me having done anything I can think of to change that), but none of them are listed in the management console.
I'm unfamiliar with S3 and not sure how to diagnose let alone resolve this issue. Any suggestions on steps I can do to figure out what the problem is would be appreciated, thanks.
Every time I've seen this error, it has been permissions:
Triple-check your AWS Access_key, Secret_key, and REGION
If you have any doubt about the keys, regenerate a new set to be sure you are using the correct keys.
If you end up changing any of them, remember to restart your server to re-read the values.

Images in rails 3.1 - moving to production

My articles have images. I put the images in app/assests/images and store their location in a field in the database.
Then I can display them in by using:
<%= image_tag(#article.image) %>
But when I move to the production server, none of my images show up! The server's looking for assets/blank-d5dd6e3683b4753dfde3c70cf61f99b6.png rather than blank.png and it isn't available.
How do I sort this?
This is a problem I ran into when Rails 3.1 was released.
Normal assets
If your assets are manually placed by you then all you have to do is run:
rake assets:precompile
This will precompile your assets into public/assets.
It's best to precompile on your production server so you don't have unessential files on your development server.
Uploaded assets
If you are uploading images using something like Paperclip, then don't use the asset folder.
You need put your images in the public folder. In your case probably public/assets/articles
Further Info
RailsGuides - Asset Pipeline

Resources