public async Task <UploadFileResult> UploadFile(byte[] image, string fileName, bool isCreatePDF, string PDFFileName, string watermarkText) { var reply = await new MyServiceClient().UploadFile(image, fileName, isCreatePDF, PDFFileName, watermarkText); if (!reply.IsSuccess) { Helpers.LogEvent("UploadFileFailed", new Dictionary <string, string>() { { "Error", reply.Data }, { "File", fileName } }); return(new UploadFileResult() { Data = reply.Data }); //throw new DataLoadException(reply.Data); } return(new UploadFileResult() { IsSuccess = true, Data = reply.Data }); }