Blobber Usage
The usage of Blobber is pretty simple. We need to set the default account name, access key, and container name in blobber.exe.config, which is the application config file as shown below.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
<!-- Remove next 3 key's if using if using remote azure storage  -->
    <add key="AccountName" value="devstoreaccount1"/>
    <add key="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/>
    <add key="BlobStorageEndpoint" value="http://127.0.0.1:10000/"/>
<!--  Uncomment this portion if using remote azure storage 
    <add key="AccountName" value="PUT YOUR USER NAME HERE"/>
    <add key="AccountSharedKey" value="PUT YOUR KEY HERE"/>
    <add key="BlobStorageEndpoint" value="http://blob.core.windows.net"/>
-->
    <add key="ContainerName" value="mycontainer"/>
  </appSettings>
</configuration>

The sample configuration XML can be downloaded here - http://www.codeproject.com/KB/winsdk/MyBlobber/Blobber_exe_config.zip

Example usage: Once configuration values are set, we may simply use Blobber from the command line.
Upload
C:\Blobber -u test.txt
Download
C:\Blobber -d D:\test.txt

Argument options:
* '-u' or '-d <file>': Specifies the filename to upload or download. Filename with spaces should be enclosed in "double quotes".
* '-v' <0/1>: Verbosity 0 (Off: Default) or 1 (On). This argument is optional, and should be first if used.

Sample Output:
Sample Blobber Output



Blobber Code
The code is compact, simple, and self-explanatory. All we need to know is some simple concepts of command line argument parsing and Application Config settings in C#. To access Azure storage, it uses StorageClient.dll provided in the samples of the Azure SDK. Typically, you may find it at "C:\Program Files\Windows Azure SDK\v1.0\samples.zip\StorageClient". The StorageClient.dll wraps the Azure Storage API as described in MSDN. More on code and documentation is available at http://www.codeproject.com/KB/winsdk/MyBlobber.aspx where Blobber was first published.

Last edited Nov 22, 2009 at 6:09 AM by bhavik1st, version 7

Comments

No comments yet.