Project

General

Profile

Actions

Bug #7600

open

WFileUpload Fails with Large Files

Added by John Robertson almost 4 years ago. Updated over 3 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/12/2020
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by John Robertson almost 4 years ago

I've tried this on Debian 10 and Ubuntu 18.04.4 amd64 systems.

Actions #2

Updated by Roel Standaert almost 4 years ago

Yes, you're supposed to increase that limit to allow for larger files.

Actions #3

Updated by John Robertson almost 4 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?

Actions #4

Updated by Roel Standaert almost 4 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.

Actions #5

Updated by John Robertson almost 4 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.

Actions #6

Updated by Roel Standaert almost 4 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.

Actions #7

Updated by Roel Standaert almost 4 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.

Actions #8

Updated by John Robertson almost 4 years ago

Roel Standaert wrote:

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.

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.

Actions #9

Updated by John Robertson almost 4 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?

Actions #10

Updated by Roel Standaert almost 4 years ago

That refers to the size of the input in (approximate) number of characters. It's like WLineEdit::setTextSize.

Actions #11

Updated by Marco Kinski over 3 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.

Actions #12

Updated by John Robertson over 3 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

Actions

Also available in: Atom PDF