Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Chadwick 26 posts 104 karma points
    Dec 04, 2016 @ 11:12
    Mike Chadwick
    1

    Umbraco.Storage.S3 Backoffice not showing Previews

    Hi All,

    I'm hoping this is just me missing something but I have setup and installed Umbraco.Storage.S3 on Umbraco v7.5.4, having followed the setup instructions very carefully. I set up the VirtualPathProvider and the ImageProcessor.Web.Config and edited global.asax.cs and added ref to global.ascx.

    Managed to add a new media item in the backoffice and it uploaded to S3 successfully. All working fine.

    However if you revisit the Media section backoffice (sometime afterwards), the S3 image previews (and crop previews) do not display when you click to view a particular media item.

    It appears that they reference images without passing any parameters to the ImageProcessor so they fail to show at all.

    The main image preview only shows if the containing folder is selected which previews all child images.

    Also I didn't see any generated crops on S3. Has anyone else had the same problem? Can anyone help in getting this configured correctly, perhaps I have just missed something..

    I really appreciate your help in advance....

  • Jonathan Richards 288 posts 1742 karma points MVP
    Dec 05, 2016 @ 12:33
    Jonathan Richards
    0

    Hi,

    Just a heads up, in case its the same prob as I had, which sounds similar. I would double check something :-

    1. Ignore using the Umbraco backend, and try and view the image directly from S3. See that you can view the image directly. You might need to use an S3 browser to do this.

    2. Next try and view the image via the virtual path, but not going through the image processor. Eg. directly surf in your browser www.mydomain.com/media/1024/myimage.jpg

    3. Next add a width parameter into the above virtual path, like www.mydomain.com/media/1024/myimage.jpg?width=1024

    If Step 1 don't work, but from your description, this step will pass, then you have an S3 problem, eg. you haven't setup your S3 bucket correctly - nothing to do with Umbraco, solve this problem Amazon config first.

    If Step 2 fails, you haven't configured your S3 bucket in the config files in Umbraco. Again, from your description this step will pass.

    If step 3 fails, which is the one, you suggest is failing. Then, its likely to be an access problem for image processor. Try and make the S3 bucket with anonymous access. The S3 browser will tell you the access rights to the images - Bizarrely image processor needs anon access (This has been what causes this issue in the past, and what I've done to solve it, I've never checked why, so can't state this as a fact)

    Cheers

  • Mike Chadwick 26 posts 104 karma points
    Dec 06, 2016 @ 06:00
    Mike Chadwick
    1

    Hi Jonathan,

    Thanks for the reply. Here's the results from the above tests:

    1) Yes this worked and the image is visible from S3 directly.
    2) This did not work, I also installed ImageProcessor.Web.Config so it now expects a parameter like width so without nothing appears.
    3) This works (as in point 2). But thanks for the heads up on anon access.

    So it seems that I am missing some S3 bucket config in Umbraco. I followed everything in the setup guidelines. I configured the virtual path but perhaps I need to additionally need to configure something more.

    This is what the part I need to work (not currently working) www.mydomain.com/media/1024/myimage.jpg

    as well as this (which is already working) www.mydomain.com/media/1024/myimage.jpg?width=1024

    Any ideas what I've missed? Thanks again for your help. :-)

  • Jonathan Richards 288 posts 1742 karma points MVP
    Dec 06, 2016 @ 10:06
    Jonathan Richards
    0

    Hi Michael,

    www.mydomain.com/media/1024/myimage.jpg = Fails
    www.mydomain.com/media/1024/myimage.jpg?width=1024 = Success
    

    Well, I have no answer for why, only the image processor can access the file, not the virtual path. Sadly my issue was the other way around, I can suggest its some sort of S3 config issue, but what I don't know.

    I've also, made a sweep of https://github.com/ElijahGlover/Umbraco-S3-Provider and checked my setup compared to what the install required, in case there is an issue with the install - I remember it took quite a few attempts to get everything correct - I had to set it up for multiple environments. And the only thing, I can see diff is Instead of using OnApplicationStarting (Which I believe has been/will be depreciated), I use ApplicationStarting to kick start the Virtual Path Provider:-

    public class Register : ApplicationEventHandler
    {
        protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            FileSystemVirtualPathProvider.ConfigureMedia();
        }
    }
    

    But I don't think this is the source of your problem.

    Sorry, and good luck finding the issue.

Please Sign in or register to post replies

Write your reply to:

Draft