Hi Richard Cross,
Yes, after changing the album storage to the file system, all new uploaded images will go to the file system, but the old images will stay in the database, because the storage provider is internally set per item, and everything should work fine.
Here is the code for changing the storage provider of a library and moving all library item to the new storage:
/// Change the album BLOB Storage Provider and begins transfering album images to the BLOB storage of the album.
/// This might be a long time operation. If it doesn't finish for some reason, can be resumed.
/// <param name="albumName">Name of the album.</param>
/// <param name="newBlobStorageProvider">The new BLOB storage provider.</param>
var manager = LibrariesManager.GetManager();
var album = manager.GetAlbums().Where(i => i.UrlName == albumName).FirstOrDefault();
album.BlobStorageProvider = newBlobStorageProvider;
var imagesToTransfer = album.Images.Where(i => i.Status == ContentLifecycleStatus.Master && i.BlobStorageProvider != newBlobStorageProvider);
var liveImage = manager.GetLive(image);
var tempImage = manager.GetTemp(image);
It is safe to execute it more than one time.
All the best,
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>