Windows Azure Blob Storage Emulator File Storage Location

£可爱£侵袭症+ 提交于 2019-12-24 13:46:15

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/21210043/windows-azure-blob-storage-emulator-file-storage-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!