PC Review


Reply
Thread Tools Rate Thread

File Download/Resume

 
 
=?Utf-8?B?Q3JvdWNoaWUxOTk4?=
Guest
Posts: n/a
 
      1st Mar 2005
How do I download a file & resume from where it left off at a later time/date?

Any ideas?
 
Reply With Quote
 
 
 
 
Tom Shelton
Guest
Posts: n/a
 
      1st Mar 2005
On 2005-03-01, Crouchie1998 <(E-Mail Removed)> wrote:
> How do I download a file & resume from where it left off at a later time/date?
>
> Any ideas?


What protocol are you using to download the file? Both http and ftp are
capable of resuming downloads - or is this a custom protocol? The
answers to these questions will help you get a proper answer...

--
Tom Shelton [MVP]
 
Reply With Quote
 
=?Utf-8?B?Q3JvdWNoaWUxOTk4?=
Guest
Posts: n/a
 
      1st Mar 2005
I am using http (System.Net.HttpWebRequest) to download the file
 
Reply With Quote
 
Tom Shelton
Guest
Posts: n/a
 
      2nd Mar 2005
In article <3AD665E9-02F0-4A06-9140-(E-Mail Removed)>, Crouchie1998 wrote:
> I am using http (System.Net.HttpWebRequest) to download the file


Ok... You'll want to use the HttpWebRequest.AddRange method before you
try and resume the download... You'll look at how many bytes your
recieved and want to start at the next byte. So say you got 50 bytes of
a 100 byte file... you would call:

' - indicates from this position to end of data
myWebRequest.AddRange (-51)

Does that make sense? You are basically setting the HTTP Range header.

--
Tom Shelton [MVP]
 
Reply With Quote
 
=?Utf-8?B?Q3JvdWNoaWUxOTk4?=
Guest
Posts: n/a
 
      2nd Mar 2005
OK. Thanks, but I need to keep the file as a byte array & then open it from
the next byte I think. How do I do about doing all this (code sample please)?

"Tom Shelton" wrote:

> In article <3AD665E9-02F0-4A06-9140-(E-Mail Removed)>, Crouchie1998 wrote:
> > I am using http (System.Net.HttpWebRequest) to download the file

>
> Ok... You'll want to use the HttpWebRequest.AddRange method before you
> try and resume the download... You'll look at how many bytes your
> recieved and want to start at the next byte. So say you got 50 bytes of
> a 100 byte file... you would call:
>
> ' - indicates from this position to end of data
> myWebRequest.AddRange (-51)
>
> Does that make sense? You are basically setting the HTTP Range header.
>
> --
> Tom Shelton [MVP]
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Download resume miracle Windows XP General 1 4th Aug 2008 08:54 PM
file sharing over the internet w/ download resume mr.silky.johnson@gmail.com Windows XP Networking 3 14th Jan 2006 05:20 PM
does anyone know how to resume an interrupted file download? =?Utf-8?B?VGhpc0ZhbGxlbkFuZ2VsNjk=?= Windows XP New Users 1 21st Nov 2005 01:17 PM
Do the Microsoft download sites support download resume Videot Windows XP Help 1 7th May 2004 07:21 AM
resume and seek operation during file download Vikramaditya Singh Microsoft VB .NET 4 28th Jan 2004 06:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:38 PM.