Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I need to change the location of the media folder, moving it from the ~/media virtual folder to an external NAS with its own physical path and url.
I changed the FileSystemProviders.config file by removing the virtualRoot parameter and by adding rootPath and rootUrl.
<Provider alias="media" type="Umbraco.Core.IO.PhysicalFileSystem, Umbraco.Core">
<add key="rootPath" value="C:\Temp\UmbracoMedia" />
<add key="rootUrl" value="//whatever.example.com/umbracomedia/" />
After the change new files are correctly stored into the new path and accessibile with the new url, but the ones I saved before the change are still only accessible at the old /media url and not at the new one, even if I moved the physical files to the new location.
On top of this, I cannot edit old files as I get an exception:
Umbraco.Core.IO.FileSecurityException: File '/media/1051/koala.jpg' is outside this filesystem's root.
I want to clarify that I moved the files to the new rootPath
Any idea of how to move the URLs of old files to the new location?
That makes sense if you haven't updated the media item's property for the path as it will still be the original (relative) media path, i.e., /media/1052/kitten.png
So, if you have existing media that you've hoisted to your new storage location you'll need to update the media item property path to reflect the new location. You could use the MediaService for this or go straight to the database. Using the MediaService is the recommended approach of course.
For example, when we have sites with existing media that then switch to using the Azure Blob Storage Provider we need to update the media path to the fully qualified url the media item http://dogsdrool.blob.core.windows.net/media/1052/kitten.png
Yeah, I realized that myself already :)
But I don't think this is how people expect it to work: looking on "our" I found many posts (without an answer) about changing the location of the media folder and not seeing it applied to old media.
I expect that changing the configuration and moving the old media files to the new location would work.
The fact that no documentation on this is available doesn't help.
I'll write the doc and send a pull request :)
have replied with some detail about this here: http://issues.umbraco.org/issue/U4-9086
Hi I have a similar issue. When I try to delete one of my old custom media content with images I get this error and I can't delete any of the medias uploaded before change it to Azure Blob Storage:
ERROR ImageProcessor.Web.HttpModules.ImageProcessingModule -
ImageProcessor.Common.Exceptions.ImageProcessingException: ProcessImageAsync 597 : No image exists at D:\home\site\wwwroot\media\1034\case-659x420.jpg
What would be the problem?
This iaaue don't let me modify or delete the medias after we move the media folder to Azure Blob Storage.
Complete issue and discussion on stackoverflow
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted