[KDE-India] Reading Binary file

Aditya Mooley aditya.ml at gmail.com
Sat Jan 7 12:57:53 CET 2006


Hi,

I am working on a KDE application to upload images to Coppermine. I got the
HTTP part working correctly and it is posting the data to gallery.
But the image file is not getting uploaded. I get only 4 bytes in the
uploaded file on the server.
Looks like the file is not being read properly at my end.

This is what I am doing to read the file:

QFile userfile(fileName);
    if ( !userfile.open(IO_ReadOnly) ) {
      QMessageBox::information(this, tr("HTTP"),
        tr("Unable to open the file %1: %2.")
        .arg(openFilesPath).arg(userfile.errorString()));
    }
    fileSize = userfile.size();
    userfile.readAll();

Thanks in advance for your help.

Regards,

--
Aditya
=============================================================
PHP Applications for E-Biz: http://www.sanisoft.com
Coppermine Picture Gallery: http://coppermine.sf.net
=============================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-india/attachments/20060107/66eb6ddf/attachment.html


More information about the KDE-india mailing list