Large size files are not uploaded using ajax request
Mityung12 opened this issue · comments
I try to upload a text file of 20MB and saved it in a file test.txt but not all contents are uploaded and saved, file size is just 48KB.
I used ajax request to send files using multipart/form-data as enctype.
Is that because of qhttp server uploading file size limit or anything else?
Have you tried with a small file? I cannot send any data into the body.
yes i can send files,
i have problem with qhttp server, it receive data from browser in QByte that have max size 65536 bytes so it can't upload files greater then ~50KB.
I just testet an upload with the size of 1MB - works like a charm?
Have you taken this into account? -> #20
actually i was using it as
connect(req, SIGNAL(data(const QByteArray&)), this, SLOT(postMethod(const QByteArray&)));
so in QByteArray it can only have max 65536 bytes,
Pro tip: Don't send big data via SIGNALs. I once attempted that myself and nearly ended up beeing burnt at the stake when i was talking about it to some qt-centre guys^^
Try to use pointers instead of the real data in your signals and delete things you dont need anymore with my_pntr->deleteLater();
I am able to receive 100MB files.