1
votes

Where does the Windows Azure Blob Storage Emulator (yes, the emulator) store files uploaded to it? As in, what is the actual folder (path) that it is storing blobs on my local machine? I have it setup and running and I can successfully upload blobs and retrieve blobs, but I'd like to know where the emulator is actually storing the files. After uploading a blob, the address I get is:

http://127.0.0.1:10000/devstoreaccount1/mycontainer/picture.png 

I am using xampp and the files don't seem to be in my htdocs folder. I'm just curious, that's all.

2

2 Answers

7
votes

The storage emulator listens at the address you see there, but when requests come in it uses the SQL store as the back end storage.

The storage emulator uses SQL Server LocalDB by default, or you can use the DSInit.exe command line utility to point it at a full SQL Server instance. All table, queue and BLOB data is then saved in that database. In the case of BLOBs the metadata is stored in the database, but then the file is stored in an appdata directory. For example, one of mine was in c:\users\michael\appdata\local\developmentstorage\sql\blockblobroot\1\c1ba3640-ad8e-4cbb-8818-95c7d866cb71.

If you point your emulator at a SQL Express or SQL Server instance you can then use SQL Management Studio to connect to that instance and dig into the tables. There is a table named Blob with a column of DirectoryPath which will tell you were the files are. I wouldn't go messing around much with the structure of this database, or the file structure outside of using the API or a storage tool or you may cause issues with your local emulator stability.

Also note that this is NOT how the data is stored in Windows Azure, only how the local emulator simulates it.

4
votes

As of 4.6

The storage emulator stores the data of all types as files (without extensions) under the root folder;

C:\Users\username\AppData\Local\AzureStorageEmulator