Sending Excel file via post script.
Solved
General and Desktop
-
Hi,
I want to send a excel file via post:QNetworkRequest request( QUrl( "my url") ); request.setHeader( QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded" ); QUrlQuery params; params.addQueryItem( "username", accountName ); params.addQueryItem( "file", reportFile->readAll() ); QNetworkAccessManager manager; QNetworkReply *reply = manager.post( request, params.query().toUtf8() );
But I get the upload error .
The post script is tested and works fine.
Can anybody check if I do something wrong there?
Any hints would be priceless.Best regards,
Tomek