Hi,

I was trying using Azure Storage Service operations but facing problems
uploading a Page Blob.

Requirement: Uploading a VHD, creating a custom image & hence a VM out of
it (using REST API/JClouds support).

Blocking Issue: Using Storage Account name & primary access key as
credentials, I successfully created a storage container but while creating
a PAGE BLOB, I was getting AzureStorageResponseException.

Doing something like this:

        AzureBlobClient blobClient =
AzureBlobClient.class.cast(context.unwrap(AzureBlobApiMetadata.CONTEXT_TOKEN).getApi());
        AzureBlob newBlob = blobClient.newBlob();
        File f = new File("C:\\sample.txt");
        newBlob.getProperties().setName("<blobname>");
        newBlob.setPayload(f);
        newBlob.getProperties().setContainer("<containername>");
        MutableBlobPropertiesImpl properties = (MutableBlobPropertiesImpl)
newBlob.getProperties();
        properties.setType(BlobType.PAGE_BLOB);
        blobClient.putBlob("<containername>", newBlob);

Is there a way to upload a file >64MB using PutBlob(Blob Type: PAGE BLOB)
operation ?

Is PUT PAGE(Windows Azure REST API) support provided by JClouds ? Can I get
a sample implementation/examples for the same.

Any help in this regard would be highly appreciable.

Thanks,
Kriti

Reply via email to