Discuss this help topic in SecureBlackbox Forum
Clouds: Write data to existing file
To write the data into the existing file
C#:
TElGoogleDriveFile file = storage.AcquireObject(@"
TElGoogleDriveDataStorage class has OnProgress event, which allows to track and show the progress of data upload, and interrupt the transfer if necessary.
If the data being uploaded to the server are to be encrypted or signed, you need to take certain additional steps.
Google Drive provides two methods for data uploading. The first one uploads data to the server as a single piece. So, if the connection is broken for any reason before all the data is transferred, the uploaded data is lost and has to be reuploaded again completely.
Such method is not effective for uploading large files, thus for files greater than specified in the TElGoogleDriveDataStorage.ChunkedUploadThreshold property another method, called "chunked upload", is used. Using this method data is uploaded to the server chunk-by-chunk. The chunk size is specified in the TElGoogleDriveDataStorage.ChunkedUploadChunkSize property. So, if the connection is broken, only data from the last chunk is lost. Just call TElGoogleDriveFile.Write() method again and uploading will be resumed automatically.
Unfortunately, Google Drive doesn't allow to write only a part of file, that's why the TElGoogleDriveDataStorage.WriteBlock() method throws an "unsupported operation" exception.