Hi was there ever I resolution for this? I have the same issue.
I can access blob storage using CloudBerry, no file are available
I have checked the logs when uploading an image and there are no errors (see event log detail below)
I have restarted the application and can see the code getting hit on initialize.
Yet when I upload it stores the image at the local path, rather than blob storage.
Running Kentico 9 .net 4.6.2 locally attached to Azure SQL database, just trying to set media items only for blob storage
I have all required setting in web.config
<add key="CMSAzureAccountName" value="vectorwebstoragedev" />
<add key="CMSAzureSharedKey" value="################" />
<add key="AzureContainerMediaPath" value="vectordev" />
EVENT LOG DETAIL on upload
Event ID: 38421
Event type: Information
Event time: 1/9/2017 1:41:14 PM
Source: Media file
Event code: CREATEOBJ
User ID: 53
User name: administrator
IP address: 127.0.0.1
Description: Create Media file 'right_icons-01'
Site name: ######
Machine name: THOMASBE-LT002
Event URL: /CMSModules/MediaLibrary/CMSPages/MultiFileUploader.ashx?InstanceGuid=ff44bc26-f763-4da6-952e-f9d4fb72e464&filename=right_icons-01.png&FilesCount=1&ResizeArgs=0;0;0&complete=true&StartByte=0&MediaLibraryArgs=MediaLibraryID%7c21%7cMediaFolderPath%7c%7cMediaFileID%7c0%7cIsMediaThumbnail%7cFalse%7cMediaFileName%7c%7cHash%7c0c00a268387bc3103e1eefc3f3458bbd23d013b43cb5ec1118010c2f0c4d1b0a&AdditionalParameters=SourceType%7cMediaLibraries%7cParentElementID%7clibraries%7cIsInsertMode%7cTrue%7cAfterSaveJavascript%7c%7cTargetFolderPath%7c%7cTargetFileName%7c%7cIncludeNewItemInfo%7cTrue%7cOnlyImages%7cFalse%7cRaiseOnClick%7cFalse%7cTargetAliasPath%7c%7cTargetCulture%7c%7cEventTarget%7c%7cHash%7cc97c152adc7db50a06a1f930c891ba0dbdc3b67b93b040243eb82788158597ca&CurrentFileIndex=1&FileSize=7085&AllowedExtensions=pdf;doc;docx;ppt;pptx;xls;xlsx;htm;html;xml;bmp;gif;jpg;jpeg;png;wav;wma;wmv;mp3;mp4;mpg;mpeg;mov;avi;swf;rar;zip;txt;rtf;webm;ogg;wav;ogv;oga;svg|Hash|520b9b3da2b69e40e3b0f747283d446be07a199da012675abd5babc7983fc319
URL referrer: https://kentico/CMSModules/MediaLibrary/Tools/Library_Edit_Files.aspx?objectid=21&tabselemid=m_c_plc_lt_ctl00_VerticalTabs_l_t_tabsElem
User agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
CUSTOM CLASS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CMS.IO;
using CMS.Base;
[CustomStorage]
public partial class CMSModuleLoader
{
private class CustomStorageAttribute : CMSLoaderAttribute
{
/// <summary>
/// The system executes the Init method of the CMSModuleLoader attributes when the application starts.
/// </summary>
public override void Init()
{
// Creates a new StorageProvider instance
AbstractStorageProvider mediaProvider = new StorageProvider("Azure", "CMS.AzureStorage");
// Specifies the target container
mediaProvider.CustomRootPath = "blob";
// Makes the container publicly accessible
mediaProvider.PublicExternalFolderObject = true;
// Maps a directory to the provider
StorageHelper.MapStoragePath($"~/{Vector.PublicWeb.Common.Helpers.SettingsHelper.System.AzureContainerMediaPath}/Media/", mediaProvider);
}
}
}