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

[Maximum file upload size] seems to be unused, right? #846

Closed
MoonLord-LM opened this issue Aug 28, 2022 · 5 comments
Closed

[Maximum file upload size] seems to be unused, right? #846

MoonLord-LM opened this issue Aug 28, 2022 · 5 comments

Comments

@MoonLord-LM
Copy link

// 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);
@smalos
Copy link

smalos commented Sep 7, 2022

Yes, it looks like.

@redherring917b
Copy link

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.

@redherring917b
Copy link

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.

@redherring917b
Copy link

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.

@prasathmani
Copy link
Owner

This issue is addressed in the new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants