Exporteren (0) Afdrukken
Alles uitvouwen
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

CloudBlob.UploadText Method (String)

Updated: April 24, 2013

[This topic is part of the Windows Azure Storage Client Library 1.7, which has been deprecated. The current recommended version is Storage Client Library 3.0.]

Uploads a string of text to a block blob.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)

'Gebruik

public virtual void UploadText (
	string content
)

Parameters

content

Type: System.String

The text to upload, which will be encoded as a UTF-8 string.

The following code example uploads a blob from text. This example overwrites the blob if it already exists in the container.

static void UploadBlobFromText(Uri blobEndpoint, string accountName, string accountKey)
{
    // Create service client for credentialed access to the blob.
    CloudBlobClient blobClient = 
        new CloudBlobClient(blobEndpoint, 
            new StorageCredentialsAccountAndKey(accountName, accountKey));

    // Get a reference to the blob.
    CloudBlob blob = blobClient.GetBlobReference("mycontainer/myblob.txt");

    // Upload the blob from a text string.
    blob.UploadText("Upload a blob from text.");
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Weergeven:
© 2014 Microsoft