MyBB Community Forums

Full Version: Question about .attach files in the upload folder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I see that every time someone uploads an image as an attachment, there is a .attach file created, with the same file name as the attached image file.

As a test, I deleted the .attach file for a test attached image, and this did not seem to have any negative effect on the display of the attached file.

Is there a reason I should keep these .attach files in the upload folder? They are several times the size of the actual image files (six times larger than the test attached image, in fact), and eat up space quickly.

I would like to remove the unnecessary clutter, if they are truly unnecessary files. Right now, these .attach files are eating up 40+ MBs of space at my web site. Not cool.

MACJR
(2014-12-28, 11:27 PM)MACJR Wrote: [ -> ]if they are truly unnecessary files

Why would you think that MyBB creates and stores big useless files for absolutely no reason?

I guess you're mistaking thumbnails with full size images. After removing .attach files the actual attachment will not work, but the miniatures in posts will still display (if you click on them, you'll end up on a broken page).

As for the size of them - if the initial files are big, the attachments will be big too. There is no magic that would allow you to store files on your server without preserving their original size (without compressing them at least).
(2014-12-29, 12:16 AM)Destroy666 Wrote: [ -> ]
(2014-12-28, 11:27 PM)MACJR Wrote: [ -> ]if they are truly unnecessary files

Why would you think that MyBB creates and stores big useless files for no reason?

I guess you're mistaking thumbnails with full size images. After removing .attach files the actual attachment will not work, but the miniatures in posts will still display (if you click on them, you'll end up on a broken page).

It did make me wonder why these files exist, if they served no purpose, other than perhaps as an initial install process or something. I also thought that maybe they were meant to be cleared out every so often.

I then searched for a cleanup option for this, after I posted my question, but, of course, I did not find one.

I also did take a look inside one of those .attache files, with notepad, and I noticed that it looked like an image file. Now that I know it is the actual uploaded image, I know what is going on.

I am glad that I waited for a reply to my question, rather than just clean out all those .attach files. The test image I used is about the size of a small thumbnail image, so I didn't think to click on it to see what would happen. I also did not actually delete the .attach image file, I just moved it to a temp folder.

I may have to consider pruning old images that I have posted and are no longer relevant to the board, though, to free up space. It took way too long to do a full file backup of my website today. It does not help that my main web site is a gallery of my digital art (that is badly in need up being updated and renovated - which is what I am about to start work on).

Thank you for the information, Destroy666. It was helpful.

MACJR