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

How to save file attachment to db in custom addon

Discussion in 'XenForo Development Discussions' started by Mr.N2K, Aug 10, 2013.

  1. Mr.N2K

    Mr.N2K Member

    Hello all,
    First, i'm so sorry for my bad English.
    I'm using curl to get img (Ex: http://xenforo.com/community/styles/default/xenforo/logo.png) to data/news directory. But i want save this img to db + internal_data like attach file in post.
    Please tell me how to do it or how the attachment system works ?
    Thanks so much !!!
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Just a note, the attachment system doesn't save files to the database.
     
  3. Mr.N2K

    Mr.N2K Member

    In the table attachment and attachment_data is info of attach file ?
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    The database stores information such as the content it's attached to and location, not the image itself.
     
  5. Mr.N2K

    Mr.N2K Member

    I want to know how do do it.
     
  6. JulianD

    JulianD Well-Known Member

    You would need to create an add on to extend several portions of the code. Not to mention the implications in database performance. I would probably not do it without a deep analysis to stability and performance.
     

Share This Page