Announcement

Collapse
No announcement yet.

need advice on storing MANY attachments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • need advice on storing MANY attachments

    I am going to use my forum to attach images that my members can download. There will be anywhere from 5-50 attachments per thread. they will all be either jpg's or gif's. i will be the only one posting in this forum.

    how would you recommend storing these files (on server or in db) and are there any other concerns that i may have overlooked?

    thanks
    Websites For Sale | Adsense Ready Blogs For Sale

  • #2
    I would recommend storing them in the filesystem, as you can skip a query for fetching them from there.

    Also be advised that your database will get big fast if you store attachments in the database.
    Last edited by Colin F; Tue 25th Jan '05, 6:05am. Reason: correction
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      thanks for your reply.

      so its either add a query or have a large database? why would i choose the latter? I dont understand
      Websites For Sale | Adsense Ready Blogs For Sale

      Comment


      • #4
        Storing everything in the database does make it bigger, but it could be a bit easier to backup your forum, as everything is more or less in one place, namely the database.
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          Actually i need to dissagree with you colin, vBulletin was never made for mass attachments (however some people have 14GB worth, but that is besides the point). If you are planning to have lots and lots of attachments you will want to store them in the filesystem. Storing them in the filesystem greatly reduces the load when you have a large ammount of attachments. MySQL was never ment to store large chunks of binary data.

          Comment


          • #6
            that's what i was wondering, Zachery. thanks for clarifying that.
            eric
            Websites For Sale | Adsense Ready Blogs For Sale

            Comment


            • #7
              well for me i think adding them to the data base keeps them safe from hot linking which is more important for me
              because you can countrol how and who can view the attachments

              Comment


              • #8
                You can do that by storing them under (or above depending on your termnology) the web root.

                lets say you login to your ftp. and you see public_html ect

                You make a new folder here called

                myboard_attachments and chmod it

                Now none of the attachments are hotlinkable, even if you store them above the webroot, they are not diretly hotlinkable.

                all attachments are stored as {attachid}.attach so you wouldn't even know which one you were getting or whatformat it woudl be

                Comment


                • #9
                  How is that disagreeing with me?
                  Best Regards
                  Colin Frei

                  Please don't contact me per PM.

                  Comment


                  • #10
                    You recomended the database, me fielsystem

                    Comment


                    • #11
                      Meant the same, wrote something else
                      Best Regards
                      Colin Frei

                      Please don't contact me per PM.

                      Comment


                      • #12
                        oh i thoght vb dumps the attachments to a dir and there like directly linked
                        but on a big forum that will over load mysql right ?

                        Comment


                        • #13
                          They do dump attachments to a directory, however they are named with {Attachmentid}.attach inside of /u/s/e/r/i/d/ so

                          for me here

                          /1/9/4/0/5/{id}.attach
                          and if it was an image
                          /1/9/4/0/5/{id}.thumb

                          and this releaves quite abit of load on the mysql server

                          Comment


                          • #14
                            I mentioned this before, but wouldn't a possible solution be the ability to link files as a URL in the attachment box? You can upload the files through ftp, and since they are considered a attachment by VB, wouldn't they have the same amount of protection as a proper attachment listed in the forum? Sure save a lot of work and time as well. I requested this feature, it's actually very simple, been done enough times, but not good enough to figure it out. Of course you would have to protect the folder as well.
                            shiva

                            http://www.roxr.shivasite.com

                            Comment


                            • #15
                              Originally posted by Zachery
                              They do dump attachments to a directory, however they are named with {Attachmentid}.attach inside of /u/s/e/r/i/d/ so

                              for me here

                              /1/9/4/0/5/{id}.attach
                              and if it was an image
                              /1/9/4/0/5/{id}.thumb

                              and this releaves quite abit of load on the mysql server
                              so beeing dumped to a dir lowers the load on mysql ?
                              i thoght i saw on of the posts say that it will incress mysql requests

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X