0

When I use the file system to store items from the Media Library, I can see that each item stores either an absolute path or one that is relative from the webroot - not a path that is relative from the Media.FileFolder setting.

This means that I cannot use the same data in dev and live if they have a different Media.FileFolder (which they do).

Is there a way to configure Sitecore so that the path of every item in the Media Library is relative to the Media.FileFolder?

3
  • 1
    Add virtual directory in IIS how it is described here: bugdebugzone.com/2016/08/…
    – Anton
    Commented Jan 18, 2019 at 18:04
  • I'll try it on Monday and I'll come back. Commented Jan 18, 2019 at 18:06
  • 1
    This works for me! If you write it as an answer I'll be happy to accept it. Commented Feb 6, 2019 at 12:37

1 Answer 1

1

You are able to configure virtual folder in IIS that will point to absolute location on your server, e.g.: "SharedMedia" folder that point to "C:\SharedMedia". Then you will be able to configure Sitecore use this virtual folder as location for media files:

<setting name="Media.UploadAsFiles" value="true">
<setting name="Media.FileFolder" value="/SharedMedia">

There are more detail how to do it in this article.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.