File downloader problem

  • Thread starter Thread starter Paul Porthouse
  • Start date Start date
P

Paul Porthouse

Hi.

I have successfully written an automatic file downloader in VB.NET
using webrequest but I can't find any information anywhere on how to
read in the filename that the server is sending.

Normally the server would specify it using the content-disposition
header, but that is not visible in any of the headers I have found.

The server is definitely sending the filename, as if you download it
using IE, the filename is there.

Any help would be appreciated.

Thanks

Paul
 
* (e-mail address removed) (Paul Porthouse) scripsit:
I have successfully written an automatic file downloader in VB.NET
using webrequest but I can't find any information anywhere on how to
read in the filename that the server is sending.

Normally the server would specify it using the content-disposition
header, but that is not visible in any of the headers I have found.

The server is definitely sending the filename, as if you download it
using IE, the filename is there.

Maybe I am missing something, but when sending a request for a file, you
already know the name of the file to be downloaded...
 
* (e-mail address removed) (Paul Porthouse) scripsit:

Maybe I am missing something, but when sending a request for a file, you
already know the name of the file to be downloaded...

Sorry if I haven't described it properly.

The program is for pulling files off remote servers which I have no
control over. It is also automatic, as it will pull many files off the
server over the course of a day. Therefore I don't know the name of
the files, you just call a particular URL with an ID number and if
there is a file for that ID, it will start the download. (The id you
supply is a number from 10000 to 99999).

Everything is working fine in the program, apart from there is no way
to meaningfully name the files (the files are images).

Thanks.

Paul.
 
Hi Paul... I made an application using WebRequest, WebResponse and a Stream
to download a file from Internet. Today that file have grown and the download
process is interrumped or timed out constantly. This app does not support
resuming, so I'm now searching for any documentation about resuming and HTTP
file download. As far as I've read I need to use HTTP headers to specify
something like "Content-Range: 10000-12000/25000". I'm surely missing
something because after adding this to the header of my request always gets
me the file from the beggining.

I should really appreciate any help from you if you can direct me to some
documentation about this.

Thanks
 

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