Receiving Files Opinions

  • Thread starter Thread starter John Puopolo
  • Start date Start date
J

John Puopolo

All,

I have a situation where my customer needs to send me some files on an
aperiodic basis, read: whenever they feel like it. These cusomters are no
technically-oriented per se, so a simple solution is required. Taking
Internet access as a given, I am considering having them simply FTP me the
files - easy enough. My question is...If I write a C# class that
periodically goes to fetch the files from the FTP drop site, is there a way
I can know how large the file should be? For example, supposed I start
reading file A and see that it's 100 bytes. How do I know that this 100
bytes is not the first 100 bytes of a 500 bytes file?

Thanks,
John
 
files - easy enough. My question is...If I write a C# class that
periodically goes to fetch the files from the FTP drop site, is there a way
I can know how large the file should be? For example, supposed I start
reading file A and see that it's 100 bytes. How do I know that this 100
bytes is not the first 100 bytes of a 500 bytes file?

if you operate on a file system-level then you can simply ask the file
system for a size of a selected file. if you operate on a net-level, the FTP
protocol handles the data for you, so you also should not have any problems.

I would also suggest to build a trivial aspx page to upload files (you need
a html input component of type="file"). this could be simpler for a customer
to use a html page to upload files, than using the ftp protocol.

Regards,
Wiktor Zychla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top