• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Attachment Folder Systems

dvsDave

Well-known member
#1
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?
 

Jake Bunce

XenForo moderator
Staff member
#3
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.
 

DRE

Well-known member
#4
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