QString boundary("----WebKitFormBoundary"); QByteArray data; // №1 data += "--" + boundary + "\r\n"; data += "Content-Disposition: form-data; name=\"subject\"\r\n\r\n"; data += "185/55 R16 Continental ContiPremiumContact\r\n"; // №2 data += "--" + boundary + "\r\n"; data += "Content-Disposition: form-data; name=\"bulletin_type\"\r\n\r\n"; data += "bulletin\r\n"; QFile *file = new QFile("E:/Mishana!/1.png"); file->open(QIODevice::ReadOnly); // add image data += "--" + boundary + "\r\n"; data += "Content-Disposition: form-data; name=\"up[]\"; filename=\"1.png\"\r\n"; data += "Content-Type: image/jpeg\r\n\r\n"; data += file->readAll() + "\r\n"; data += "--" + boundary + "--\r\n"; m_jar->setCookiesFromUrl(m_cookies, SEC_REQ_ADD); m_setting.WriteAddReq2(m_request, data.length()); m_reply = m_manager->post(m_request, data); QObject::connect(m_reply, &QNetworkReply::finished, &m_loop, &QEventLoop::quit); m_loop.exec(); // №3