private void UploadFile(string uri)
{
var fileName = Path.GetFileName(uri);
AddCommand(CommandFactory.CreateCommand<UploadProgressMessage>(
CommandType.Upload,
Slave,
fileName,
command =>
{
Send(new UploadFileMessage
{
Id = command.Id,
Path = GetFilePath(fileName),
Uri = uri
});
},
progress =>
{
// nothing to do on continue
},
progress =>
{
FireSlaveEvent(SlaveEventType.FileUploaded, fileName);
FinishCurrentCommand();
NavigateToTypedFolder();
},
FinishCurrentCommand));
}