Link to my forum: https://tp3.usscalemasters.net/forumsmf2 (In maintenance mode)
SMF version: 2.1.4
TP version: 3.0
Default Forum Language: English
Theme name and version: Default Curve 2
Browser Name and Version: Several
Mods installed: TP 3.0, Custom Form 4.0.6, SMFPacks Multimedia Gallery 2.0.4 SMFPacks Downloads Dir
Related Error messages: File was not uploaded. Error 104
Trying to upload an image in quick-list and getting the Error 104 message. Tried another version of the image but in same .png format only smaller. So ok, I have upload size limit set to low. The image that failed is 1.09MB and the version that worked is 39.2KB. So I went to Article settings say that Max image upload size was set to something like 500Kb so I bumped it up to 4096Kb. Still get the same error? Am I adjusting the correct setting? No other error in any logs.
Thanks
Mitch
Am I right in thinking that is a file size limit??
Thanks
Mitch
Yes, it is.
I was not aware of this, but I just noticed that this is a hard-coded limit, set in Upload.php
class Upload
{
private static $_instance = null;
private $allowed_mime_types = [];
private $errors = [];
private $max_file_size = 1024;
private $allowed_chars = 'a-z0-9_.-';
private $mime_types = [
'txt' => 'text/plain',
'htm' => 'text/html',
'html' => 'text/html',
If you increase the limit here, it will work
private $max_file_size = 1024;
Checking the setup a bit further I see the parameter in the article settings page is only defining the maximum upload size for article icon images.
In itself that is okay: article icons are supposedly smaller images then article images, so having their own max size setting makes sense. It does not makes sense that there is no user setting for setting the max upload size for article images.
I am thinking of adding this to the article settings...
I agree, should be able to adjust it, at least some. Also a little better error message might help. Even if it is a hard limit, something indicating that would be very helpful.
Also, something that indicates that other setting is just for the icon size might be helpful. Yes it is in there with the icon image size, but as I did, could be taken as an overall image size limit.
Going to make an adjustment to that, I just need it bumped up a bit.
If you need tester for something, just let me know.
Thanks
Mitch
Agree.
Bumped it up to 2MB and worked like a champ on the image I was trying to upload.
Thanks
Mitch
Just added the setting in the beta package of version 3.0.1
If you would like to test it I can add you to the beta tester group so you can download it...
Sure, I have the test version running. Can put it there..
Thanks
Mitch
Added you as beta tester. Find the package here https://www.tinyportal.net/index.php?topic=36914.0
By the way, I had a look at the error handling, but did not yet succeed to put a meaningful error in.
@tino can you help me there?
Quote from: @rjen on July 06, 2024, 10:21:36 AMBy the way, I had a look at the error handling, but did not yet succeed to put a meaningful error in. @tino can you help me there?
What are you trying to do? You can capture the error 104 the other class returns and put a custom error message in.
That's what I tried to do, but once again my skills are insufficient to make it work. With some sample code I may be able to replicate it