AWS S3 bucket images not appearing in Rails app
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.
ruby-on-rails amazon-web-services heroku amazon-s3
add a comment |
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.
ruby-on-rails amazon-web-services heroku amazon-s3
What do you mean by didn't work?
– Rcordoval
May 16 '18 at 4:56
add a comment |
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.
ruby-on-rails amazon-web-services heroku amazon-s3
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.
ruby-on-rails amazon-web-services heroku amazon-s3
ruby-on-rails amazon-web-services heroku amazon-s3
asked May 16 '18 at 4:20
RobertRobert
298
298
What do you mean by didn't work?
– Rcordoval
May 16 '18 at 4:56
add a comment |
What do you mean by didn't work?
– Rcordoval
May 16 '18 at 4:56
What do you mean by didn't work?
– Rcordoval
May 16 '18 at 4:56
What do you mean by didn't work?
– Rcordoval
May 16 '18 at 4:56
add a comment |
3 Answers
3
active
oldest
votes
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
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
add a comment |
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.
add a comment |
First You have to make bucket public and if still its not showing than check whether you have mentioned image name or not in your code
val uploadObserver = transferUtility?.upload(key:"folderInBucketName/" + "FileName", file)
Note: This code is in kotlin but issue might be same
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50362413%2faws-s3-bucket-images-not-appearing-in-rails-app%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
add a comment |
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
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
add a comment |
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
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
answered May 16 '18 at 5:07
RohanRohan
1,2501312
1,2501312
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
add a comment |
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
Thanks - silly me I didn't notice that you needed to make it public :-)
– Robert
May 16 '18 at 5:51
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered May 16 '18 at 5:45
fool-devfool-dev
5,67572440
5,67572440
add a comment |
add a comment |
First You have to make bucket public and if still its not showing than check whether you have mentioned image name or not in your code
val uploadObserver = transferUtility?.upload(key:"folderInBucketName/" + "FileName", file)
Note: This code is in kotlin but issue might be same
add a comment |
First You have to make bucket public and if still its not showing than check whether you have mentioned image name or not in your code
val uploadObserver = transferUtility?.upload(key:"folderInBucketName/" + "FileName", file)
Note: This code is in kotlin but issue might be same
add a comment |
First You have to make bucket public and if still its not showing than check whether you have mentioned image name or not in your code
val uploadObserver = transferUtility?.upload(key:"folderInBucketName/" + "FileName", file)
Note: This code is in kotlin but issue might be same
First You have to make bucket public and if still its not showing than check whether you have mentioned image name or not in your code
val uploadObserver = transferUtility?.upload(key:"folderInBucketName/" + "FileName", file)
Note: This code is in kotlin but issue might be same
edited Nov 14 '18 at 9:27
Mohammad
15.6k123462
15.6k123462
answered Nov 14 '18 at 9:09
Siddhant PatilSiddhant Patil
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50362413%2faws-s3-bucket-images-not-appearing-in-rails-app%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you mean by didn't work?
– Rcordoval
May 16 '18 at 4:56