Dani3lSun / apex-plugin-dropzone

Oracle APEX Region Plugin - Dropzone
MIT License
72 stars 19 forks source link

maxPostSize of request exceeds server default configuration #11

Closed crokitta closed 7 years ago

crokitta commented 7 years ago

Expected behavior

setting max. Filesize to 50 (MB)

Actual behavior

error during upload of file for files > ~2MB

seems, that uploading files using your approach (sending the file in pieces of 30K in 1 request) can exceed the maximum allowable POST request size configured on the webserver

Steps to reproduce the issue

APEX version (4.2.6 / 5.0.3)

5.0.3

Used web server / version and platform (ORDS 3.0.3 / Tomcat 7 / Apache 2.4 / Linux x64)

Tomcat 8.0, maxPostSize: The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than zero. If not specified, this attribute is set to 2097152 (2 megabytes). Note that the FailedRequestFilter can be used to reject requests that exceed this limit.

I have no access to the servers configuration in the customers corporate environment.

My suggestion: split the upload request in multiple requests rather then using one single request or using the good-old-fashined CLOB upload method instead (http://www.talkapex.com/2012/08/how-to-sendupload-clob-from-browser-to.html)

Used web browser / version and platform (Chrome 48 Mac / Firefox 44 Windows)

Dani3lSun commented 7 years ago

Hey @crokitta

over the holidays I spent some of my time on this plugin and now version 2.0 is ready to go. This version is built from ground up new, this means it is not compatible with version 1.xx (changed a whole bunch of attributes & logic). Thus version 2 has a new Internal name you can install it beside version 1 and can migrate to the new version...see the readme note.

The new version now has the possibility to choose the Upload Mechanism. Here you can select "Chunked". This Method splits a file to 1MB chunks and uploads every chunk separately to the server via AJAX (To a Temp Collection). On server side the Temp Collection is read and builds the final file...This Method is incompatible with old Web servers like OHS or WebTier.

Hope this helps and of course happy new year!;)