Discuss this help topic in SecureBlackbox Forum
Clouds: Upload file
To upload the file to the server
C#:
TElBoxFolder folder = storage.AcquireFolder(@"...");
try
{
Console.WriteLine("Folder: {0} (size = {1})\n", folder.Name, folder.Size);
FileStream source = new FileStream("uploaded.bin",
FileMode.Open, FileAccess.Read);
try
{
TElBoxFile file = folder.CreateObject("uploaded.bin", source,
null) as TElBoxFile;
file.Release();
}
finally
{
source.Close();
}
}
finally
{
folder.Release();
}
If the data being uploaded to the server are to be encrypted or signed, you need to take certain additional steps.
Use OnProgress event of TElBoxDataStorage class to track and show the progress of data upload, and interrupt the transfer if necessary.