Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

andyr

Posts

5

Joined

Tue Jan 11, 2011 10:12 pm

How do I download the last 4K of a very large file?

by andyr » Tue Jan 11, 2011 10:15 pm

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: How do I download the last 4K of a very large file?

by support2 » Wed Jan 12, 2011 7:30 am

no avatar
User

andyr

Posts

5

Joined

Tue Jan 11, 2011 10:12 pm

by andyr » Wed Jan 12, 2011 8:08 am

no avatar
User

andyr

Posts

5

Joined

Tue Jan 11, 2011 10:12 pm

by andyr » Wed Jan 12, 2011 8:10 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Wed Jan 12, 2011 10:31 pm

Please post the debug log here.
no avatar
User

andyr

Posts

5

Joined

Tue Jan 11, 2011 10:12 pm

by andyr » Wed Jan 12, 2011 10:44 pm

Not sure how to get the logs but I will check. Meanwhile if you repro it with an 18 byte text file and :

For an 18 byte file called test.txt I did:

ftp.InvokeFTPCommand("REST 14", "350");
var bytes = ftp.DownloadByteArray("test.txt");

but this downloads all 18 bytes and not the last 4 as required.

You will see it fail.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Wed Jan 12, 2011 10:57 pm

Take a look in the dev guide for the logging how to.
no avatar
User

andyr

Posts

5

Joined

Tue Jan 11, 2011 10:12 pm

by andyr » Thu Jan 13, 2011 7:18 am

Hi,

I've confirmed its a bug in your downloadbytearray code with reflector. You always start at the beginning of the stream.
I don't have time to submit the debug logs when you've already got good repro steps and I can see from the code that it won't work.

I've had to move to a different FTP library thats supports downloading part of a file. Good luck in fixing the bug.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Thu Jan 13, 2011 11:21 am

Ok thanks for the info. We never really thought people would use resume with a byte array!

Who is online

Users browsing this forum: No registered users and 90 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron