Hey guys,
I'm currently using the CloudUpload to upload files to an internal server.
This happens over multiple single steps in clsDaten.UploadReklamationsDateienKEMdoc.
This would return a true if succesfull uploaded and a false, as well as an error message if not.
I now want to show this error message in the interface and an Error sign instead of the succesfull check.
But I dont find anywhere how.
Does anyone have an idea?
Greetings Benedikt
public class clsCloudUploadProvider : ICloudUploadProvider
{
long uploadFilesCount = 0;
clsReklamation Reklamation;
public Task<object> UploadFileAsync(string fileName, Stream fileStream, CloudUploadFileProgressChanged uploadProgressChanged, CancellationToken cancellationToken)
{
return Task.Factory.StartNew<object>(() => UploadFile(fileName, fileStream, uploadProgressChanged, cancellationToken), cancellationToken);
}
private object UploadFile(string fileName, Stream fileStream, CloudUploadFileProgressChanged uploadProgressChanged, CancellationToken cancellationToken)
{
this.uploadFilesCount++;
var fileLength = fileStream.Length;
uploadProgressChanged(fileLength);
object[] ImportState = Import(fileStream, fileName);
if ((bool)ImportState[0])
{
return fileName;
}
else
{
return null;
}
}
public object[] Import(Stream filestream, string filename)
{
return clsDaten.UploadReklamationsDateienKEMdoc(Reklamation, (filestream as FileStream).Name);
}
public clsCloudUploadProvider(clsReklamation reklamation)
{
Reklamation = reklamation;
}
}