Copied to clipboard

Flag this post as spam?

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


  • Robin Hansen 135 posts 368 karma points
    Dec 20, 2023 @ 10:24
    Robin Hansen
    0

    Question about setup and imagecropper

    I'm trying to make a setup between a production site and a staging site.

    Production on the root of my domain (mydomain.com), and the staging on a subdomain (staging.mydomain.com). On my production I want /umbraco to redirect to a 404 page. Since my production and staging site shares database, I guess I can do all my editing on the staging site, including media upload. Then create a virtual directory in the IIS between the two media folders.

    Works fine on my local testsetup, however the images are not crooped on mu production site. Would it be sufficient to make an absolute path to the cache folder on my subdomain, if so, how...? this solution will not accept an absolute url.

  • Brendan Rice 538 posts 1099 karma points
    Dec 20, 2023 @ 14:31
    Brendan Rice
    0

    It's weird that it works fine locally, assuming it's a similar set up to live.

    Is there any settings on live (redirects/URL rewrites) that may be causing the issue?

  • Robin Hansen 135 posts 368 karma points
    Dec 20, 2023 @ 19:04
    Robin Hansen
    0

    Only the virtual directory to the media folder works. I see the images, but they are not cropped...

  • Brendan Rice 538 posts 1099 karma points
    Dec 20, 2023 @ 19:05
    Brendan Rice
    0

    Can you share your Startup.cs Configure method here please?

    I recently broke the image cropper by making changes to it.

  • Robin Hansen 135 posts 368 karma points
    Dec 23, 2023 @ 12:28
    Robin Hansen
    0

    Nothing is broken per say. The virtual directory makes the images from the staging site visible on the production site (see below), how ever the images are nor cropped on the producton site, as they are on the staging site. Is it because I need to store the caching files a central place where both sites can reach them...?

    • -- Producton Site

    • -- Staging Site

      • /media ( Virtuel directory to production site)
  • Robin Hansen 135 posts 368 karma points
    Jan 11, 2024 @ 14:06
    Robin Hansen
    100

    Actually - I abandoned the whole virtual directory thing, and created a subdomain for my media files. Then added the path in my appsetting file (UmbracoMediaPhysicalRootPath): https://docs.umbraco.com/umbraco-cms/reference/configuration/globalsettings

    Things seems to work as planned now :)

Please Sign in or register to post replies

Write your reply to:

Draft