SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: storing images

  1. #1
    SitePoint Zealot
    Join Date
    May 2001
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    storing images

    Hello. How many of you store your images in a database? Just reading thru Agile Web Development with Rails and the upload example does this, and found after searching around that quite a few do this and particularly when using rails. Why?

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    never.
    I've always considered it extremely bad practice to store images in a database. Try the file_column plugin which does things correctly, storing images in the filesystem and a record of them in the database.

    I imagine the AWD book used this method for simplicity.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2000
    Location
    England
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd echo the "don't store images in a database" comment. Much better to just store a full/relative path in the db and save the image as a normal file.

  4. #4
    SitePoint Zealot
    Join Date
    May 2001
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I don't store in a database either. Was just curious


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •