How to send ByteArray in QHttpPart
Hello,
I just want to know the main difference between the QHttpPart methods "setBody()" and "setDeviceBody()".
as i have read about both two is:
setBody takes QByteArray as an argument. (this method will be used unless the device is set, or small amount of data)
setDeviceBody takes QIODevice as an argument. (It uses for large amount of data)
Now my problem is i want to send Byte array of large image file.
In this case setBody fails but setDevice body only takes argument as QIODevice.
I dont want to save my bytearray data into a digital file.
Anyone have idea to send large byteArray through QHttpPart
Re: How to send ByteArray in QHttpPart
If you already have the data in a QByteArray then use that.
Re: How to send ByteArray in QHttpPart
Just in case: QBuffer is a QIODevice that works on a QByteArray
Cheers,
_