How to increase max file size correctly. #1503

Closed
opened 2026-10-05 00:46:15 +02:00 by adam · 6 comments
Owner

Good morning.

I just increased those values on php.ini:
post_max_size => 10240M => 10240M
upload_max_filesize => 2048M => 2048M
post_max_size => 10240M => 10240M

From the default 100MB limit just to allow upload my DSLR pics (which are too big) and upload some videos vía videojs plugin but those seems to have no effect:

That's a 1,4GB vídeo:

image

¿Where are those vars ignored? Using nginx with max_body_size on 0; (unlimited)

Thanks in advance.

Good morning. I just increased those values on php.ini: post_max_size => 10240M => 10240M upload_max_filesize => 2048M => 2048M post_max_size => 10240M => 10240M From the default 100MB limit just to allow upload my DSLR pics (which are too big) and upload some videos vía videojs plugin but those seems to have no effect: That's a 1,4GB vídeo: ![image](https://user-images.githubusercontent.com/20403906/189337681-335ac6f1-ff5a-4c84-a69d-362ab4daf322.png) ¿Where are those vars ignored? Using nginx with max_body_size on 0; (unlimited) Thanks in advance. <!-- github-sync-id:1367679149 -->
adam closed this issue 2026-10-05 00:46:15 +02:00
Author
Owner

probably related to piwigo linuxserver io image

https://github.com/linuxserver/docker-piwigo/issues/53

probably related to piwigo linuxserver io image https://github.com/linuxserver/docker-piwigo/issues/53 <!-- github-comment-id:1241857840 -->
Author
Owner

@hardwareadictos
I encountered the same problem. And I found that the 1GB upload limit is a problem with the script on the browser. I found the answer at the following URL. It worked for me.
https://piwigo.org/forum/viewtopic.php?id=32008

Modify admin/themes/default/template/photos_add_direct.tpl
Around row 100:

filters : {
                        // Maximum file size
                        max_file_size : '1000mb',
                        // Specify what files to browse for
                        mime_types: [
                                {title : "Image files", extensions : "{/literal}{$file_exts}{literal}"}
                        ]
                },

Changing the max_file_size to you want. I set it to 4000mb.

@hardwareadictos I encountered the same problem. And I found that the 1GB upload limit is a problem with the script on the browser. I found the answer at the following URL. It worked for me. [https://piwigo.org/forum/viewtopic.php?id=32008](https://piwigo.org/forum/viewtopic.php?id=32008) Modify `admin/themes/default/template/photos_add_direct.tpl` Around row 100: ```tpl filters : { // Maximum file size max_file_size : '1000mb', // Specify what files to browse for mime_types: [ {title : "Image files", extensions : "{/literal}{$file_exts}{literal}"} ] }, ``` Changing the max_file_size to you want. I set it to 4000mb. <!-- github-comment-id:1251712253 -->
Author
Owner

Oh men!! Thanks a lot! You made my day 🙂

I don't understand why there is a file size limitation on a theme(!?) Anyways that's not a linuxesever.io issue, it's more likely a Piwigo issue.

Thanks again.

Oh men!! Thanks a lot! You made my day 🙂 I don't understand why there is a file size limitation on a theme(!?) Anyways that's not a linuxesever.io issue, it's more likely a Piwigo issue. Thanks again. <!-- github-comment-id:1252035814 -->
Author
Owner

This hardcoded 1000mb is not a good practice (we even change it on Piwigo.com). Let's make it configurable.

This hardcoded `1000mb` is not a good practice (we even change it on Piwigo.com). Let's make it configurable. <!-- github-comment-id:1253697181 -->
Author
Owner
Fixed in https://github.com/Piwigo/Piwigo/commit/f95bab9e90f2ed5d51e2ba42f78cc56c036fb1c2 <!-- github-comment-id:1253714154 -->
Author
Owner

@tony53517230 I also really appreciate you reposting here. I have been trying to figure out for probably the last 6 months or more what was causing the 1GB upload limit! (Obviously giving up in frustration until met with it again the next time I would have another large file to upload).

@plegall I would imagine there are more then just @hardwareadictos @tony53517230 and myself running into this especially with video playback support. Is there some way to make the setting available within the Admin Configuration -> Options Section? And maybe even clearly displayed within the Tools -> Maintenance -> Environment Section?

@tony53517230 I also really appreciate you reposting here. I have been trying to figure out for probably the last 6 months or more what was causing the 1GB upload limit! (Obviously giving up in frustration until met with it again the next time I would have another large file to upload). @plegall I would imagine there are more then just @hardwareadictos @tony53517230 and myself running into this especially with video playback support. Is there some way to make the setting available within the Admin Configuration -> Options Section? And maybe even clearly displayed within the Tools -> Maintenance -> Environment Section? <!-- github-comment-id:1279896597 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1503