I saw you found already a different solution, but I encountered the same problem and wanted to share my solution.
Basically, relative urls are stored in the database in the umbracoPath property of the media item, so if you change the rootUrl property it will only apply to newly uploaded files. Old files will still remain under the old path, so if you move them to the new path, nothing will work anymore.
Solution is:
change config
move old media files to new path
rename the relative url of all old media to the new url (in DB or
using the MediaService
Move media directory to other drive
Hi all,
I'm looking into moving the ~/media folder to another drive on the same machine. The Umbraco version used is 7.4.2
What I've tried sofar:
1) Setting the umbracoMediaPath in the appSettings (docs), no longer used since 4.9
2) Modifying the /config/FileSystemProviders.config, but I can't figure out the correct values (source), my config currently looks like this:
3) Created a virtual directory in IIS, now the images show up when browsing the site, but in the backoffice the Media section is empty
Could someone please tell me what it is I'm doing wrong? Any help is appreciated!
As it appears I was overthinking the problem :(
The simplest solution for moving the media folder to another drive is:
That's it, no need to change any config files!
I saw you found already a different solution, but I encountered the same problem and wanted to share my solution.
Basically, relative urls are stored in the database in the umbracoPath property of the media item, so if you change the
rootUrl
property it will only apply to newly uploaded files. Old files will still remain under the old path, so if you move them to the new path, nothing will work anymore.Solution is:
MediaService
HTH Simone
is working on a reply...