Bug #7600
openWFileUpload Fails with Large Files
0%
Description
When uploading a 9MB file, WFileUpload fails with the following error message:
[2020-Jun-11 21:09:36.814] 18411 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
It works fine for smaller files. I am using wt-4.2.2
wt_config.xml has the following entry for max-request-size:
10000
Smaller values will generate the "File too large" error.
Updated by John Robertson almost 5 years ago
I've tried this on Debian 10 and Ubuntu 18.04.4 amd64 systems.
Updated by Roel Standaert almost 5 years ago
Yes, you're supposed to increase that limit to allow for larger files.
Updated by John Robertson almost 5 years ago
Roel Standaert wrote:
Yes, you're supposed to increase that limit to allow for larger files.
Thank you for that insight. My question, however, is why the upload fails for a 9 MB file when the limit is sufficiently large?
Updated by Roel Standaert almost 5 years ago
That's probably because there's always going to be some overhead. The file size may be 9 MB, but the actual request will be larger than that.
Updated by John Robertson almost 5 years ago
Roel Standaert wrote:
That's probably because there's always going to be some overhead. The file size may be 9 MB, but the actual request will be larger than that.
Ok, I increased the value by an order of magnitude, and still get the same error:
2020-Jun-12 07:29:23.440] 26690 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
I think this is what is called a bug.
Updated by Roel Standaert almost 5 years ago
Ah, I think I misunderstood you. Your issue is not the size limit, but something else. It's not unusual for us to have uploads that large though, so it's odd.
Updated by Roel Standaert almost 5 years ago
- Status changed from New to Feedback
- Priority changed from High to Normal
I tried to reproduce your issue with the widget gallery (modified wt_config.xml
to set max-request-size
to 10000), and I'm noticing no issues with that. Maybe this is platform or browser specific? I don't know under what circumstances you're getting this issue.
I tested it with Firefox and Chrome on Ubuntu 18.04.
Updated by John Robertson almost 5 years ago
Roel Standaert wrote:
I tried to reproduce your issue with the widget gallery (modified
wt_config.xml
to setmax-request-size
to 10000), and I'm noticing no issues with that. Maybe this is platform or browser specific? I don't know under what circumstances you're getting this issue.I tested it with Firefox and Chrome on Ubuntu 18.04.
I must apologize - after compiling the Widget Gallery and using the appropriate config, your example does indeed work. I will look closely at the example code to see what is different.
Updated by John Robertson almost 5 years ago
In the documentation it is unclear the purpose of WFileUpload::setFileTextSize(). A comment in "FileUpload.cpp" claims it limits file size, but this is clearly not the case. Could you please clarify the purpose of this function?
Updated by Roel Standaert almost 5 years ago
That refers to the size of the input in (approximate) number of characters. It's like WLineEdit::setTextSize
.
Updated by Marco Kinski almost 5 years ago
I once had a similar problem when using chrome as a browser. I did not make any notes about that but i think to remember it had something todo with a barrierer like thing (to signal end of file?) which also happened to be part of the file.
Updated by John Robertson almost 5 years ago
Marco Kinski wrote:
I once had a similar problem when using chrome as a browser. I did not make any notes about that but i think to remember it had something todo with a barrierer like thing (to signal end of file?) which also happened to be part of the file.
Thanks for chiming in. I have this working now, but I'm not exactly sure what fixed the problem. I changed one value from the default (128) in the configuration which seems to have influence:
100000