I am testing the new feature "save image to harddrive" instead of blob.
As I see there are folders created in my upload folder defined in QA_BLOBS_DIRECTORY. As it seems these are arbitrary numbers from 000 to 184.
Two questions:
1. What is the mechansim behind the folder numbers?
okay, while writing this post, I found the answer in: function qa_get_blob_directory()
(subdirectories are named by the first 3 digits of $blobid)
2. How can I retrieve the path to the file on the harddisk using qa_blobs table?
This is important as I would like to update my image manager plugin accordingly.
Okay, number 2 can also be solved regarding number 1.
But there is another question now:
3. Why is "849092891028879862.png" saved in folder "008" and not "849" ?
Here is the substring return from function qa_get_blob_directory:
rtrim(QA_BLOBS_DIRECTORY, '/').'/'.substr(str_pad($blobid, 20, '0', STR_PAD_LEFT), 0, 3);
But what is happening here? STR_PAD_LEFT fills zeros to the left, 0, 3 takes the first 3 digits.... ?
Thanks.