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.