Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropzone-Upload im Backend POST > Maximale Upload-Dateigröße #1192

Closed
LinkingYou opened this issue Nov 16, 2017 · 9 comments
Closed

Dropzone-Upload im Backend POST > Maximale Upload-Dateigröße #1192

LinkingYou opened this issue Nov 16, 2017 · 9 comments
Assignees
Labels
Milestone

Comments

@LinkingYou
Copy link

Im aktuellen Contao 4.4.8 kommt es bei uns in einer speziellen Konstellation zu Problemen mit großen Dateien:

Ein Kunde möchte einige Bilder im Backend in die Dropzone hochladen. Die Bilder die der Kunde auf einmal in die Dropzone schiebt, haben folgende Größe (in dieser Reihenfolge): 16,7MB / 20,3MB / 16,3MB / 12,2MB / 11,4MB / 11,2MB. Folgende Einstellungen haben die einzelnen Komponenten:

Einstellung Apache:
MaxRequestLen 30000000

Einstellung Contao:
Maximale Upload-Dateigröße: 25000000

Einstellung php.ini:

post_max_size = 32M
upload_max_filesize = 32M

Im Grunde sollte das so funktionieren. Alle Bilder werden auch hochgeladen - nur die ersten beiden nicht (X-Symbol). Werden diese einzeln hochgeladen, funktioniert alles. PHP-Log zeigt keine Problem. Contao-Log auch nicht. Nur das Apache-Log hat einen Eintrag:

[Thu Nov 16 10:14:55.232937 2017] [fcgid:warn] [pid 27349] [client 123.123.123.123:55454] mod_fcgid: HTTP request 
length 30007296 (so far) exceeds MaxRequestLen (30000000), referer: https://www.die-domain-des-kunden.de/

Es scheint so, dass die Dropzone in einem Post immer zwei Dateien übertragen möchte. In diesem Falle also 16,7MB+20.3MB=37MB. Bei den folgenden Dateien kommt diese Konstellation nicht mehr zu Stande.

Deswegen vermute ich einen Bug in der Dropzone oder in der Konfiguration des Dropzone-Objects. Im Contao-Demo kann ich das leider nicht testen - Upload ist hier ja nicht erlaubt.

@fritzmg
Copy link
Contributor

fritzmg commented Nov 16, 2017

Die MaxRequestLen solltest du wohl eher auf zumindest 33554432 = (32 MiB) setzen, wenn du Uploads bis zu 32M erlaubst.

@LinkingYou
Copy link
Author

Da hast Du sicherlich recht (hab ich der Vollständigkeit halber auf dem Server angepasst). Ändert aber leider nichts an dem Verhalten.

@fritzmg
Copy link
Contributor

fritzmg commented Nov 16, 2017

Tatsächlich ist die DropZone im Contao Backend so konfiguriert, dass sie mehrere Dateien in einem Request sendet. Siehe DropZone.php#L60

uploadMultiple
default: null
Whether to send multiple files in one request. […]

http://www.dropzonejs.com/#config-uploadMultiple

@Toflar
Copy link
Member

Toflar commented Nov 16, 2017

We could add chunking: true and chunkSize: <maxUploadSize> couldn't we?

@fritzmg
Copy link
Contributor

fritzmg commented Nov 16, 2017

Sounds reasonable. But does that provide any advantage? What if the uploadMultiple setting was simply removed?

@Toflar
Copy link
Member

Toflar commented Nov 16, 2017

Well it would need to be supported by Contao but it would improve the speed when uploading lots of data. Imho this has to be either removed (as a hotfix anyway) but we could also think about having support for chunked upload.

@agoat
Copy link
Contributor

agoat commented Nov 17, 2017

+1 for chunking.

Another problem with big uploads are timeouts (expecially on shared hosting environments).

@leofeyer leofeyer added the bug label Nov 21, 2017
@leofeyer leofeyer added this to the 4.4.9 milestone Nov 21, 2017
@leofeyer leofeyer self-assigned this Dec 5, 2017
@leofeyer
Copy link
Member

leofeyer commented Dec 5, 2017

Fixed in ec3bd92.

@leofeyer leofeyer closed this as completed Dec 5, 2017
@leofeyer
Copy link
Member

leofeyer commented Dec 5, 2017

Regarding chunked uploads: We should discuss the new feature separately from this bug request. Preferably in a pull request. 😄

@leofeyer leofeyer modified the milestones: 4.4.9, 4.4 May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants