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

RM 1.1 Where are uploaded files saved?

Discussion in 'Resource Manager Support' started by rhodes, Nov 14, 2014.

  1. rhodes

    rhodes Active Member


    I use resource manager to upload text documents.

    Now I would like to modify resource manager templates and add a preview button for these documents. For this purpose I would need the file path for my uploaded documents.

    I just realized that the download button of a single resource does not link to the dowload file directly. So my question is how I can find out the server path for a single download file.

    regards, rhodes
  2. Brogan

    Brogan XenForo Moderator Staff Member

    In the internal_data directory.

    There are two database tables involved as far as attachments are concerned - xf_attachment and xf_attachment_data.
  3. Walter

    Walter Well-Known Member

  4. rhodes

    rhodes Active Member

    Thank you both @Brogan and @Walter .

    All files are saved like this "16-qzrioz294hrhljrqjoqr.data", where 16 is the data_id and the rest the file hash. So I can recover the orignial file name. That's fine.
    However, the only thing which is not clear for me is how the attachment directories are organized. Now I have a structure

    internal_data -> attachments -> 0 ,

    where 16-qzrioz294hrhljrqjoqr.data is saved, for example. If I upload a lot of attachments will XF create a folder 1 - 2 - 3 - 4 and if so where can I get the information in which of these folders I can find my .data.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Each folder holds 1000 files, with attachments with an id of 1-999 being in folder 0, 1,000-1,999 in folder 1, and so on.

    The folders are created automatically every time the attachment ID reaches a multiple of 1,000.
  6. rhodes

    rhodes Active Member

    Thank you @Brogan - you've been most helpful!

Share This Page