Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: landyvlad on January 24, 2023, 10:36:48 AM

Title: Problem with image attachments in 2.0.19
Post by: landyvlad on January 24, 2023, 10:36:48 AM
A user reported as follows:
QuoteWhen one uploads a new topic with a picture that is too big an error message is generated.
(So I) Resize the picture and try and up load again and message report 'You've already tried"!
Surely, it should allow a 'good' upload if the last was rejected.
So one must start a new topic again and then it is accepted! How frustrating is that!

I assume the image he is initially trying to upload is a huge file from a mobile phone.

I have the following attachment settings:
  Maximum attachment folder space  (0 for no limit) 0
  Maximum attachment size per post (0 for no limit) 2048 kB
  Maximum size per attachment (0 for no limit) 1024 kB
  Maximum number of attachments per post (0 for no limit) 10

I am also using the mod: Automatic Attachment Rotation (and Resize) by @dougiefresh and @GL700Wing
which I have set to reduce large images to max 1024x1024 pixels, to reduce file size.

I don't think it's anything to do with the mod though - seems like some strange behavior from SMF itself when it comes to handling image attachments.

Any ideas / thoughts / advice?
   
Title: Re: Problem with image attachments in 2.0.19
Post by: shawnb61 on January 24, 2023, 11:04:36 AM
Have you tried it?
Title: Re: Problem with image attachments in 2.0.19
Post by: Sir Osis of Liver on January 24, 2023, 04:05:54 PM
"You've already tried" is not a core error message, maybe from the mod, but I've never seen it.  What's your upload_max_filesize in php settings?
Title: Re: Problem with image attachments in 2.0.19
Post by: landyvlad on February 12, 2023, 08:37:00 AM
I should take my own advice and reply to question I ask within a decent timeframe  :-[

In the forum admin attachment settings are:
Maximum attachment folder space (0 for no limit) 0
Maximum attachment size per post (0 for no limit) 2048 kB
Maximum size per attachment (0 for no limit) 1024 kB
Maximum number of attachments per post (0 for no limit) 10

What PHP file would I look at to find upload_max_filesize?
Title: Re: Problem with image attachments in 2.0.19
Post by: Arantor on February 12, 2023, 08:40:30 AM
upload_max_filesize is part of the core PHP configuration, not an SMF file. You might need to ask your host.
Title: Re: Problem with image attachments in 2.0.19
Post by: Sir Osis of Liver on February 12, 2023, 03:14:17 PM
Hey Arantor, good to see you again.  :)

If you have cpanel, look in Software > Select PHP Version > Options.  You should be able to change the setting there.