Upload the data in a MemoryStream object to the storage container.
This method returns a boolean value. If the data has been uploaded to the storage server, it will return true, otherwise it will return false.
The PutData method uploads the contents of a MemoryStream object to the current storage container. If a storage object exists with the same label, it will be replaced. During the transfer, the OnProgress event will fire periodically, enabling the application to update any user interface objects such as a progress bar.
Although storage object labels are similar to Windows file names, they are case-sensitive. When requesting information about an object, your application must specify the label name exactly as it was created using this method. The object label cannot contain wildcard characters.
If the label identifies an object that already exists in the container, and that object was created with the Attributes.ReadOnly attribute, this method will fail. To replace a read-only object, the application must explicitly move, rename or delete the existing object.
If a content type is provided, it must specify a valid MIME media type and subtype. For example, normal text has a content type of text/plain while XML-formatted text would have a content type of text/xml. Data that contains unstructured binary data is typically identified as application/octet-stream.. If you do not specify a content type, an appropriate content type will be determined automatically based on the label and the contents of the buffer.
If you wish to upload the contents of a file, use the PutFile method.
When this method returns, various properties such as ObjectId and ObjectLabel will be updated to reflect the values associated with the object that was created or replaced on the server.