Closed Thread
Results 1 to 5 of 5

Thread: uploading image to database

  1. #1
    ginverted is offline x10Hosting Member ginverted is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    11

    uploading image to database

    Im at the point I have to chose between displaying images from an ordinary folder or uploading and retreiving them from a database.

    Yet, I can't decide which would be best keeping in mind storage size and security.

    Ive read storing images in a database is more save, easy to move and backup. But takes more storage.

    Also, are there any good tutorials on uploading and retreiving images from a database? I managed to decode the images to base64 and insert them into the database but I can't get them out and show them on my website.

    Many thanks,

  2. #2
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: uploading image to database

    Ive read storing images in a database is more save, easy to move and backup. But takes more storage.
    Secure, probably
    Easy to move, not really
    Backup, yep.

    It will also have an impact on the database in general as it will have to store BLOB data for your images. 1 or 2 wouldn't hurt but if you have 10000 50KB images, that adds it. It'll hurt the overall performance

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  3. #3
    Penguin129's Avatar
    Penguin129 is offline x10Hosting Member Penguin129 is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    68

    Re: uploading image to database

    How would it be safer? If it's in a database, you still need to have a script to retrieve the data and act as an image. People would still be able to save the image and other things. I don't see any advantages over just using folders, except that browsing to the folder lists all the files, which can be remedied by placing an empty index file to prevent a directory listing.

  4. #4
    ShannenName is offline x10Hosting Member ShannenName is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    5

    Re: uploading image to database

    Or you could password protect the directory..or place the image folder outside /public_html (it could be www_html or htdocs depending on hosts) so people can't access it...

  5. #5
    Penguin129's Avatar
    Penguin129 is offline x10Hosting Member Penguin129 is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    68

    Re: uploading image to database

    If you password protect the directory, it will prevent people without the username and password to open it. The goal is to show it, not hide it..

Closed Thread

Similar Threads

  1. How to create MySQL database and user
    By Jesse in forum Tutorials
    Replies: 11
    Last Post: 06-04-2008, 12:25 PM
  2. Uploading file problem
    By HyDr@ in forum Free Hosting
    Replies: 5
    Last Post: 08-28-2006, 12:54 PM
  3. errors while attaching
    By mattspec in forum Feedback and Suggestions
    Replies: 0
    Last Post: 12-19-2005, 01:50 PM
  4. November Desktop
    By n4tec in forum Off Topic
    Replies: 12
    Last Post: 11-08-2005, 07:18 AM
  5. PHP BB 2.0.16 Manual instalation
    By GFIV in forum Free Hosting
    Replies: 8
    Last Post: 09-14-2005, 12:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers