AWS S3 bucket images not appearing in Rails app










0















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.










share|improve this question






















  • What do you mean by didn't work?

    – Rcordoval
    May 16 '18 at 4:56















0















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.










share|improve this question






















  • What do you mean by didn't work?

    – Rcordoval
    May 16 '18 at 4:56













0












0








0








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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












3 Answers
3






active

oldest

votes


















2














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






share|improve this answer























  • Thanks - silly me I didn't notice that you needed to make it public :-)

    – Robert
    May 16 '18 at 5:51


















0














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.






share|improve this answer






























    0














    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






    share|improve this answer
























      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
      );



      );













      draft saved

      draft discarded


















      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









      2














      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






      share|improve this answer























      • Thanks - silly me I didn't notice that you needed to make it public :-)

        – Robert
        May 16 '18 at 5:51















      2














      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






      share|improve this answer























      • Thanks - silly me I didn't notice that you needed to make it public :-)

        – Robert
        May 16 '18 at 5:51













      2












      2








      2







      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






      share|improve this answer













      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







      share|improve this answer












      share|improve this answer



      share|improve this answer










      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

















      • 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













      0














      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.






      share|improve this answer



























        0














        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.






        share|improve this answer

























          0












          0








          0







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 16 '18 at 5:45









          fool-devfool-dev

          5,67572440




          5,67572440





















              0














              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






              share|improve this answer





























                0














                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






                share|improve this answer



























                  0












                  0








                  0







                  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






                  share|improve this answer















                  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







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 14 '18 at 9:27









                  Mohammad

                  15.6k123462




                  15.6k123462










                  answered Nov 14 '18 at 9:09









                  Siddhant PatilSiddhant Patil

                  12




                  12



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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 does pagestruct do in Eviews?

                      Dutch intervention in Lombok and Karangasem

                      Channel Islands