?
Solved

Verifying uploaded document made the trip

Posted on 2013-05-29
1
Medium Priority
?
241 Views
Last Modified: 2013-05-29
Environment:
Dot net web service
C# win form client

Experts,

I've got a windows app that allows users to save .pdf files and then upload them to a web service. How can I verify the document successfully uploaded? I've got control over the client and the web service.

Thanks!
0
Comment
Question by:lateapex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 2000 total points
ID: 39206103
The service can return a true or false when it's done with the file saving.  

(pseudo code only)
<webMethod()>
public string SaveFile(byte[] filestream)
try
{
  savefile(filestream);
  return "true";
}
catch (Exception ex)
 {
   return ex.Message;
}  


anything other than "true" would be an error.

If you want double verification, just create a check method:

Client: ValidateFlie(filename);

Server:
public bool ValidateFile(string filename)
{
 string path = "c:\";
 if (System.IO.Exists(path + filename)
  return true;
 
return false;
}
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question