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

Upload files to custom data folder

Discussion in 'XenForo Development Discussions' started by account8226, Jan 27, 2013.

  1. account8226

    account8226 Guest


    I would like my users to be allowed to upload some files in a freshly created data/xxxxxxx folder in one of my add-ons.

    I'm playing with the SWFUpload button, but are there any examples of this kind of add-ons, I don't want to make any mistake ;)

    Best regards.
  2. account8226

    account8226 Guest

    Any ideas ? :oops:
  3. Chris D

    Chris D XenForo Developer Staff Member

    It's not really that straight forward.

    You would need to check XenForo_Model_Attachment for an example of how things work right now. Also it's not specifically relating to the swfupload feature (bearing in mind there's also a standard file upload button).

    You'd also need to create a custom attachment handler with additional content types set up in the database.

    It's a pretty long process actually, but basically you need to analyze every single part of the process e.g. the templates included, the attachment controller, the attachment model, the existing attachment handler and the existing content types in the XenForo xf_content_type table and all of that will hopefully give you enough clues on how to proceed.
    account8226 and Bob like this.

Share This Page