You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, December 5th 2004, 9:45pm

TransferJob and resume

Hi,

I want to download parts of files from the internet using a KIO::TransferJob. Downloading the whole file works, but I only need a small part in the middle of the files. I know the offset where to find the interesting data in the files, so I tried to tell the TransferJob to resume a download with the following code:

KIO::TransferJob* getJob = KIO::get(KURL("http://www.insert.url/here/index.html");
getJob->addMetaData( "resume", KIO::number(offset) );

connect( getJob, SIGNAL(data(KIO::Job*, const QByteArray& )), this, SLOT(slotData(KIO::Job*, const QByteArray& )));

I found the line with "addMetaData" in kdelibs/kio/kio/job.cpp and hoped it will do the trick, but it didn't work. The host supports resuming (tried that out with wget and kget).

Hope that anyone can help.

EDIT:
I tried that out with files from other hosts and it worked without problem.
Then tried the old host with wget and kget. It seems that resuming is now disabled for this host for some reason.

This post has been edited 1 times, last edit by "knorze" (Dec 6th 2004, 3:10pm)