Skip to main content
Topic: Thumbnail folders after changing width and height of thumbnails (Read 1816 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Thumbnail folders after changing width and height of thumbnails

In Attachments settings I chaged the max width and max height of thumbnails, and as expected the image thumbnails were re-created. I also use multiple directories (subdivided by year and month) to store attachments and I set a limit of 5000 files per folder. I never arrive to that value, I usually get about 200-300 attachments/month.
Today I got a mail that attachments directory is full, I checked the folders and I noticed that the current directory has 5000 files, most of them are the newly thumbnails created. I solved the problem by setting the number of files per folder to 0.

I am wondering, is this how it supposed to work? If an image attachment inserted on 05/2016 is saved into /attachments/2016/05 when re-creating the new thumbnail shouldn't be saved on the same folder instead of current folder?
sorry for my bad english

Re: Thumbnail folders after changing width and height of thumbnails

Reply #1

I'll look at any bug except anything that has to do with attachment folders as that code is pure evil !!

Re: Thumbnail folders after changing width and height of thumbnails

Reply #2

O:-)  don't waste too much time on this, not worth it ;)
sorry for my bad english

Re: Thumbnail folders after changing width and height of thumbnails

Reply #3

Since that code was one of my first SMF mods (the 3rd submitted to be precise) I'm pretty sure the code could have been much better.
Then I became lazy (well, I was lazy even at that time) and I integrated it into 2.1 I think without much changes.

I'm pretty sure the code is intended to work like that in order to save some hassles to the developer.
Bugs creator.
Features destroyer.
Template killer.

Re: Thumbnail folders after changing width and height of thumbnails

Reply #4

Thank you both for the explanation ;)
sorry for my bad english