[GH-ISSUE #846] [Maximum file upload size] seems to be unused, right? #569

Closed
opened 2026-03-02 15:59:52 +03:00 by kerem · 5 comments
Owner

Originally created by @MoonLord-LM on GitHub (Aug 28, 2022).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/846

// Maximum file upload size
// Increase the following values in php.ini to work properly
// memory_limit, upload_max_filesize, post_max_size
$max_upload_size_bytes = 5000;

// max upload file size
define('MAX_UPLOAD_SIZE', $max_upload_size_bytes);
Originally created by @MoonLord-LM on GitHub (Aug 28, 2022). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/846 ``` // Maximum file upload size // Increase the following values in php.ini to work properly // memory_limit, upload_max_filesize, post_max_size $max_upload_size_bytes = 5000; // max upload file size define('MAX_UPLOAD_SIZE', $max_upload_size_bytes); ```
kerem closed this issue 2026-03-02 15:59:52 +03:00
Author
Owner

@smalos commented on GitHub (Sep 7, 2022):

Yes, it looks like.

<!-- gh-comment-id:1239326029 --> @smalos commented on GitHub (Sep 7, 2022): Yes, it looks like.
Author
Owner

@redherring917b commented on GitHub (Oct 17, 2022):

Is this true, that $max_upload_size_bytes and surrounding logic is unused in / by Tiny File Manager? Odd if so, but ok.

I've set both my php.ini settings of post_max_size and upload_max_filesize to 5M. The upload behavior is odd though. Files that are clearly larger than 5M (test was 11M) but less than "some" value appear to be uploaded successfully by Tiny File Manager (shows progress bar and check mark), but then do NOT appear within the visible file structure (ie. are NOT actually uploaded). Other files that are larger still (test was 16M) receive the friendly "this file is too large" message as they should.

Does anyone have any thoughts on this? I didn't anticipate that this would be an issue as restricting upload by file size - at least "approximately" enough - and properly messaging the user accordingly seemed like it would be easy and would adhere to the max upload size setting.

Thanks.

<!-- gh-comment-id:1281188676 --> @redherring917b commented on GitHub (Oct 17, 2022): Is this true, that $max_upload_size_bytes and surrounding logic is unused in / by Tiny File Manager? Odd if so, but ok. I've set both my php.ini settings of post_max_size and upload_max_filesize to 5M. The upload behavior is odd though. Files that are clearly larger than 5M (test was 11M) but less than "some" value appear to be uploaded successfully by Tiny File Manager (shows progress bar and check mark), but then do NOT appear within the visible file structure (ie. are NOT actually uploaded). Other files that are larger still (test was 16M) receive the friendly "this file is too large" message as they should. Does anyone have any thoughts on this? I didn't anticipate that this would be an issue as restricting upload by file size - at least "approximately" enough - and properly messaging the user accordingly seemed like it would be easy and would adhere to the max upload size setting. Thanks.
Author
Owner

@redherring917b commented on GitHub (Oct 17, 2022):

Wanted to add that there may possibly be a filetype (aka extension) related angle to this oddity, where some filetypes are handled properly per the limits set while others are not - this still needs to be confirmed.

Thanks.

<!-- gh-comment-id:1281256281 --> @redherring917b commented on GitHub (Oct 17, 2022): Wanted to add that there may possibly be a filetype (aka extension) related angle to this oddity, where some filetypes are handled properly per the limits set while others are not - this still needs to be confirmed. Thanks.
Author
Owner

@redherring917b commented on GitHub (Oct 18, 2022):

Wanted to comment that we discovered that the following setting in the tiny file manager script that configures Dropzone

maxFilesize: 10000000000

is, despite the default size, actually in MB. And as such, changing this value to simply 5 successfully restricts file uploads to 5MB's.

While this seems to resolve the issue, it is still odd as it means that tiny file manager is ignoring its max file size setting ($max_upload_size_bytes) and using this one for dropzone. i'd still like an answer on that... why the $max_upload_size_bytes seems to be ignored.

Thanks.

<!-- gh-comment-id:1283005376 --> @redherring917b commented on GitHub (Oct 18, 2022): Wanted to comment that we discovered that the following setting in the tiny file manager script that configures Dropzone maxFilesize: 10000000000 is, despite the default size, actually in MB. And as such, changing this value to simply 5 successfully restricts file uploads to 5MB's. While this seems to resolve the issue, it is still odd as it means that tiny file manager is ignoring its max file size setting ($max_upload_size_bytes) and using this one for dropzone. i'd still like an answer on that... why the $max_upload_size_bytes seems to be ignored. Thanks.
Author
Owner

@prasathmani commented on GitHub (Nov 19, 2022):

This issue is addressed in the new release.

<!-- gh-comment-id:1320958757 --> @prasathmani commented on GitHub (Nov 19, 2022): This issue is addressed in the new [release](https://github.com/prasathmani/tinyfilemanager/releases/tag/2.5.0).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#569
No description provided.