Skip to main content

TdxCloudStorageFile.UploadContent(TStream) Method

Replaces the stored file’s content with data within the specified stream.

Declaration

procedure UploadContent(AStream: TStream);

Parameters

Name Type
AStream TStream

Remarks

Call this procedure to initiate the file update process by uploading a data stream passed as the AStream parameter to the connected online storage service’s server, which automatically raises the corresponding cloud storage component’s OnFileContentUploading event. The stream data must have the same multipurpose internet mail extension (MIME) content type as the updated file. If the data upload process results in an error, the component’s OnError event occurs; otherwise, the UploadContent procedure raises the OnFileContentUploaded event.

You can call the UploadContent procedure to update a stored file in unique online service-specific document format (such as Google Docs or Google Sheets in the case of the active Google Drive data provider, for instance) by uploading the file within a stream whose data format is registered as compatible with the target format.

Note

Handle the cloud storage’s OnFileContentUpload event to track the file update (that is, data upload) progress.

See Also