After finding that some large images were not appearing in my Rails app in Heroku, I opened an AWS account in the hope that they would be shown this way.
I uploaded my images to my S3 bucket and I registered the keys on Heroku, as per the tutorial on the Heroku site. Everything seems to be in place, so I referred to the images using the AWS link:
<img class="d-block w-100" src="https://s3-ap-southeast-
1.amazonaws.com/globalenglish1/EnglishUp-113.jpg">
But this this didn't work so I guess something is missing. The only thing that I can think it might be is that I didn't start my app in Heroku with a Procfile, and I can't find any way of creating a procfile now that I already have my app deployed to Heroku. But I don't really know if this is necessary, it's just my guess.
If anyone can give me any pointers, I would be most grateful.
As per the description provided and visiting the image source it seems that the public access has not been provided to view this image.
Please check for AWS console that the images stored on S3 bucket are publicly accessible or not.
If not then please provide public access and then check again.
For making the bucket public please find the below mentioned link.
Make a bucket public in Amazon S3
I think the problem is you have put with space ' ' on source URL like after https://s3-ap-southeast- it's with space see URL from your post it's not showing Image while I put into browser, but after removing this space like This URL it's showing image.
Check it out.
Related
I built a rails app and set up s3 and paperclip together. So far, the images are being posted into my s3 account. But on the live app it's not actually showing the image and just showing the broken file icon.
Any ideas why this is happening? Is it a paperclip error? is it Heroku? Is it my controller?
Here's the live app: http://petaluma-marin.herokuapp.com/Nutrition-Recipes
Here's my repo: https://github.com/Gcamara14/Recipe_app
Thanks!!
Your url to the images is wrong. The URL for your second image currently is this
http://s3.amazonaws.com/recipe-app-gio/recipes/images/000/000/009/medium/Screen_Shot_2017-05-30_at_1.19.49_PM.png?1496243164
What it needs to be is this
http://s3-us-west-1.amazonaws.com/recipe-app-gio/recipes/images/000/000/009/medium/Screen_Shot_2017-05-30_at_1.19.49_PM.png?1496243164
Notice instead of http://s3.aws... at the beginning you need http://s3-us-west-1.aws...
Whenever I have issues with S3 I find it is easiest to go to the bucket and look at the path and then inspect the image or asset and see if they match.
To give you a hint about what the issue might be, in your browser if you copy/paste the url for a photo you should see this message:
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
Take a look at your paperclip_defaults. You are missing the s3_host_name that would contain something like s3-us-west-1 (as mentioned in one of the prior answers).
Also looks like there is an issue already created in the paperclip repo that should help you out (here).
I need help moving the images I have from Parse to S3 on AWS. I have viewed numerous supposed guides and GitHub projects, but everything stops short at giving you all the information. One even says, you need GCS bucket set up, but gives no details on how to set up one. Just someone please help me with this. I have the S3 File Adapter in my index.js all set up for the app, but none of the images are there, they are still hosted in parse.
If you are referring to old images that where hosted with parse.com that you want to move across to your own environment then it can be done with the utility tool.
Get all files across all classess in a Parse database. Print file URLs
to console OR transfer to S3, GCS, or filesystem. Rename files so that
Parse Server no longer detects that they are hosted by Parse. Update
MongoDB with new file names.
https://github.com/parse-server-modules/parse-files-utils
Moving forward if you have setup your S3 bucket correctly all new images from your app will be stored there.
https://github.com/ParsePlatform/parse-server/wiki/Configuring-File-Adapters
I deployed my educational app in heroku(https://slobodalibrary.herokuapp.com). I've set s3 as a storage. But after some time images still disappear. What is the priobem? Where should I dig to fix it?
It looks to me like it is finding the image, but doesn't have read access, try this:
Go into your s3 bucket and make sure that your folder has read access
to all.
I recently was able to setup In-House Distribution for the company I work for. It works great.
One thing that we had to do in order to get this to work was we had to actually store the manifest.plist and Program.ipa on the server filesystem. Previously, our site would store the files in Amazon S3 storage.
The URL path for the file looked like this when it was stored in Amazon S3:
/Builds/DownloadInstall?loc=Installs/iOS/1.0.131/Program.ipa
/Builds/DownloadInstall?loc=Installs/iOS/1.0.131/manifest.plist
When it is stored on the filesystem it looks more like this:
/Builds/InHouseDev/Program.ipa
/Builds/InHouseDev/manifest.plist
Both ways, the manifest was configured properly for the relative URLs, however when we used the links for the file locations in Amazon S3, nothing would happen when you tapped on the link to install the in-house dev build.
Does anyone know what could be happening here?
Thanks for any help,
The install files have to be physically on the server for this to work. I don't know the technical reason why.. I think it has something to do with the way the side-loading works with iOS.
I want to create little ticket system : http://ticketsystemkm.herokuapp.com/
I got posters for movies to display them on main site.
When i make new movie everything works good, but after few hours images disappear.
Maybe someone had similar problem and know how to solve it.
Guessing your images are user uploads via Paperclip, or something of the like, to your public folder, which is why they're disappearing. If your app doesn't receive any traffic for 15 minutes or so, the VM it lives on is destroyed, and the public folder goes along with it.
You need to store your assets on S3, or some of other CDN. The other option is to check the relevant assets into version control into app/assets/images.
A more detailed explanation (and solution) can be found here:
https://devcenter.heroku.com/articles/paperclip-s3
Issue can happen if you change default_url of uploader or uploaded files has been deleted
You should check something:
- image path in website
- default_url in uploader
- file in that path exist
I think we cannot store files in heroku, maybe it's cleared frequently
If upload file is cleared by heroku, you should store it external(S3, Azure Storage, Google Cloud Storage, ...)