Jump to content

Strange files in img/p folder


kenshir

Recommended Posts

Hello, I found a large number of inodes into the server that hosts my prestashop installation.

Investigating, I discovered a strange situation on folder img/p
We have about 8600 products, most of them with just one image.

img/p folder contains 172.775 objects, 1,8 GB
62860 are jpeg files
50467 are files named "fileType"

The fileType files are in every folder, and contain just a text: "jpg"
What's that? May I delete them to save a lot of inodes?

I looked for an answer on google and on these forums, but I can't find any topic related.
Maybe it coud be related with this:

http://forge.prestashop.com/browse/BOOM-1848

Edited by kenshir
add last line (see edit history)
Link to comment
Share on other sites

Update: apparently, deleting all that "fileType" files seems to have no side effects.
I did it, and all images seem to be online like before, also after a cache cleaning.

Other interesting stuff: as soon as I regenerated thumnails for images through backend interface, 8979 new fileType files appeared into img/p folder.

I'm wondering if that files are helpfull in any way, or maybe necessary for some reasons. I'd like to have some experts' opinion on that.

 

Link to comment
Share on other sites

For the mods: is this the wrong place to post this kind of questions, maybe? Better to switch to the developer section?

I saved more than 100.000 inodes deleting all fileType files and all emtpy subfolders of img directory, so I guess that if it's confirmed that this is an acceptable behavior, many people could have benefits of that. Above all who uses shared hostings.

Link to comment
Share on other sites

  • 1 year later...

Hy,

sorry a little late answer.

The filetype files are created when uploading an image and are important or necessary in case you don't use .jpg files for images.

There is a loader logic (don't know where exactly to find this) which loads the image id and the file extension, which is stored inside the fileType file. If there is no filetype file, then 'jpg' is used as default. The amount of filetype files should equal the amount of images since there is such a file for each and every uploaded product image.

G, M

 

 

 

Edited by mpernkopf (see edit history)
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...