Copied to clipboard

Flag this post as spam?

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


  • David McDonnell 53 posts 251 karma points
    Jun 05, 2018 @ 15:59
    David McDonnell
    0

    ElijahGlover/Umbraco-S3-Provider in Release Mode

    Hi all

    I am successfully using Elijah Glover Umbraco S3 provider in development with images uploaded and retrieved in both CMS and Front End Site.

    I am using Umbraco 7.7.7 with ElijahGlover/Umbraco-S3-Provider

    However when I push the application to my Production Server in "Release" mode the back office fails to load and I get the following console errors:

    enter image description here

    Configs are: FileSystemProviders:

    <?xml version="1.0" encoding="UTF-8"?>
    <FileSystemProviders>
        <Provider alias="media" type="Umbraco.Storage.S3.BucketFileSystem, Umbraco.Storage.S3">
            <Parameters>
                <add key="bucketName" value="bucketName"/>
                <add key="bucketHostName" value=""/>
                <add key="bucketKeyPrefix" value="assets"/>
                <add key="region" value="regionxx"/>
            </Parameters>
        </Provider>
    </FileSystemProviders>
    

    imageprocessor.config:

    <?xml version="1.0" encoding="UTF-8"?>
    <security>
      <services>
        <service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
          <settings>
            <setting key="MaxBytes" value="8194304"/>
            <setting key="Timeout" value="30000"/>
            <setting key="Host" value="http://bucketname.s3.amazonaws.com/assets"/>
          </settings>
        </service>
      </services>
    </security>
    

    media web.config:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <clear/>
          <add name="StaticFileHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.StaticFileHandler"/>
          <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read"/>
        </handlers>
      </system.webServer>
    </configuration>
    

    main web.config app settings:

    <add key="AWSAccessKey" value="publicKey" />
    <add key="AWSSecretKey" value="secretKey" />
    

    However as soon as I put my application in debug mode in production everything works fine

    Any help would be appreciated Cheers David

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 05, 2018 @ 17:11
    Andy Felton
    0

    Hi David,

    Interesting one, not seen anything like that on our environment. I'll check your config with mine in a bit.

    Couple of questions first:

    • Is anything coming up in the log files for Umbraco (App_Data/logs)?
    • Are you using any config transforms on the config files or is the configuration basically the same between local setup and your production server?
    • Does it work in debug mode using the S3 file provider on your development machine?

    Finally can you just confirm is your compute server also on AWS (EC2)?

    Thanks Andy

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 05, 2018 @ 18:49
    Andy Felton
    0

    Hi David,

    Just checked our config and everything is identical, hopefully there is something in your log files which provides some more info.

    Thanks Andy

  • David McDonnell 53 posts 251 karma points
    Jun 11, 2018 @ 11:40
    David McDonnell
    0

    Managed to solve this issue with a missing config setting however I am noticing now that the images are not cropping on the Front End, the Back office is fine but the images rendered appear to be ignoring the crop settings in the url

    /media/1019/open_up.jpg?center=0.64197530864197527,0.45479452054794522&mode=crop&width=940&height=307&rnd=131680047740000000

    image is rendered as if no crop is specified

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 12, 2018 @ 07:11
    Andy Felton
    0

    Hi David,

    Your imageprocessing.config should work.

    To try and debug I'd suggest pushing the logging to Info level this should hopefully give more debug. Delete the AppData\cache directory so you can then determine what imageProcessor is doing. Ensure from your server you can get to http://bucketname.s3.amazonaws.com/assets/media/1019/openup.jpg, then try to go to the image from the web with the crop as pasted above.

    You should see the cached image be created and image downloaded. The issue is likely to be around imageProcessor getting the images.

    Hope that helps Andy

Please Sign in or register to post replies

Write your reply to:

Draft