Project

General

Profile

Actions

Bug #7600

open
JR

WFileUpload Fails with Large Files

Bug #7600: WFileUpload Fails with Large Files

Added by John Robertson over 6 years ago. Updated about 6 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.

JR Updated by John Robertson over 6 years ago Actions #1

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

RS Updated by Roel Standaert over 6 years ago Actions #2

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

JR Updated by John Robertson over 6 years ago Actions #3

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?

RS Updated by Roel Standaert over 6 years ago Actions #4

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.

JR Updated by John Robertson over 6 years ago Actions #5

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.

RS Updated by Roel Standaert over 6 years ago Actions #6

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.

RS Updated by Roel Standaert over 6 years ago Actions #7

  • 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.

JR Updated by John Robertson over 6 years ago Actions #8

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.

JR Updated by John Robertson over 6 years ago Actions #9

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?

RS Updated by Roel Standaert over 6 years ago Actions #10

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

MK Updated by Marco Kinski about 6 years ago Actions #11

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.

JR Updated by John Robertson about 6 years ago Actions #12

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: PDF Atom