BlobStorageManager provides general blob storage facilities. When working with blobs you use LibrariesManager to get the album that you are to alter. Blob storage providers configuration is stored in the LibrariesConfig file.
BlobStorageManager
LibrariesManager
LibrariesConfig
The following sample creates a blob storage provider:
This sample creates an album with the specified blob storage provider and uploads there the images from the specified path. The method parameters are the root folder that contains the images and the name of the blob storage provider.
First, you get the LibrariesManager and create the new album based on the root folder name. Then, you set the blob storage provider for the new album. You can find the available storage providers in Config.Get<LibrariesConfig>().BlobStorage.Providers or BlobStorageManager.ProvidersCollection. Finally, you upload the images from the folder in the album that automatically stores all the images in the location pointed by the blob storage provider.
Config.Get<LibrariesConfig>().BlobStorage.Providers or BlobStorageManager.ProvidersCollection
This sample changes the album blob storage provider and begins transferring album images to the new blob storage location of the album.
NOTE: This could be a long time operation. If it does not finish for some reason, it can be resumed.
The method parameters are the album name and the name of the new blob storage provider for the album.
First, you get the LibrariesManager and the album based on albumName. Then, you get all images that have a blob storage provider different from the new provider and, finally, transfer them to the new location pointed by newBlobStorageProvider.
albumName
newBlobStorageProvider
This sample moves all images from one album to another. If the target album uses different blob storage, the images will be transferred to the target album storage.
The method parameters are the names for the source and target albums.
First, you get the LibrariesManager and the source and target albums based on sourceAlbumName and targetAlbumName. Then, you change the parent for every item to the target album.
sourceAlbumName
targetAlbumName
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important