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

Attachment Folder Systems

Discussion in 'XenForo Development Discussions' started by dvsDave, Nov 13, 2012.

  1. dvsDave

    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?
  2. DRE

    DRE Well-Known Member

    Good question breh.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
    dvsDave likes this.
  4. DRE

    DRE Well-Known Member

    So userid 22 goes into this folder? /path/2/2/

    *scratches head
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In vB, yes.
  6. DRE

    DRE Well-Known Member


Share This Page