Discuss this help topic in SecureBlackbox Forum
Clouds: Upload file
To upload a file to the server
- Obtain the
TElGoogleDriveFolder object for the folder, to which the new file is to be placed.
-
Call TElGoogleDriveFolder.CreateObject() method of the above object, and pass it
the name of the new file.
If no security features (encryption and/or integrity protection) are going to be applied to this file, pass nil/null as the last parameter.
The method creates a file on the server and returns a TElGoogleDriveFile object for the created file.
-
Upload the data to the newly created file as described in this how-to article.
-
If you used AcquireObject() method to obtain an instance of TElGoogleDriveFolder or cloned TElGoogleDriveFolder,
remember to use TElGoogleDriveFolder.Release() method after the upload is complete.
Important: use TElGoogleDriveFile.Release() method on the file object to complete file uploading.
C#:
TElGoogleDriveFile file = folder.CreateObject("uploaded.bin",
String.Empty, String.Empty, false, false, false, null) as TElGoogleDriveFile;
try
{
FileStream source = new FileStream(@"...", FileMode.Open, FileAccess.Read);
try
{
file.Write(source);
}
finally
{
source.Close();
}
}
finally
{
file.Release();
}
If the data being uploaded to the server are to be encrypted or signed,
you need to take certain additional steps.
How To articles about Google Drive cloud
Discuss this help topic in SecureBlackbox Forum