Attachment Folder Systems

dvsDave

Well-known member
One thing I've always been curious about, coming from vBulletin is what the methodology was for the vBulletin file attachment system. Why are the paths four directories deep?
(i.e. /attachments/4/3/6/9/)

Also, if there was a reason these were 4 levels deep, why does it appear that xenforo's are only 1 level deep?
 
vB groups the attachments by user_id. In vB, userid 568 corresponds to /path/5/6/8/.

XF groups the attachments using the data_id into groups of 1000. /path/0/ contains data_ids 0-999. /path/1/ contains data_ids 1000-1999. Etc.

Both storage schemes are different ways to avoid file system limits.
 
vB groups the attachments by user_id. In vB, userid 568 corresponds to /path/5/6/8/.

XF groups the attachments using the data_id into groups of 1000. /path/0/ contains data_ids 0-999. /path/1/ contains data_ids 1000-1999. Etc.

Both storage schemes are different ways to avoid file system limits.
So userid 22 goes into this folder? /path/2/2/

*scratches head
 
Top Bottom