问题
Hey I'm creating a android application where I need to be able to download and upload blobs to my windows azure sql database from my android app can somebody explain to me how I can do a basic version of this?
回答1:
Well, there's two ways you could go with this. One is to simply use the REST API to GET and PUT data. For example, to upload a blob: PUT https://myaccount.blob.core.windows.net/mycontainer/myblob. To get the blob: GET https://myaccount.blob.core.windows.net/mycontainer/myblob (where "myaccount" and "mycontainer" are configured by you in the portal)
How you GET or PUT would be up to you.
The other is to use the native API, which is documented here: http://www.windowsazure.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/
In particular, how to download a blob: http://www.windowsazure.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/#DownloadBlob and how to upload a blob: http://www.windowsazure.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/#UploadBlob
Update:
To get started with Android and Azure, this is a good place to start:
http://www.windowsazure.com/en-us/develop/mobile/android-samples/
来源:https://stackoverflow.com/questions/22489790/blob-android-download-and-uploading-to-windows-azure