Re: Alternative methods for storing uploaded images?
| From: | Jacob Kruger | Date: | Thu, 10 May 2012 19:05:28 +0000 |
| Subject: | Re: Alternative methods for storing uploaded images? | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-30874@lists.php.net to get a copy of this message | ||
Definitely makes sense with regard to site performance, but, sort of in past used something like this in ASP.Net to sort of/partially make sure only signed in users/browsers could then actually 'see' images, etc., but, that could also be handled easily enough using a form of server-side redirect/reroute, etc., and, main thing is was just wondering about it, but, for now, am definitely quite content/happy enough renaming image files and then using the static content/files later on.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
----- Original Message ----- From: "Gavin Chalkley" <gavin.chalkley@gmail.com>
To: "'Jacob Kruger'" <jacobk@mailzone.co.za>; <php-windows@lists.php.net>
Sent: Thursday, May 10, 2012 8:35 PM
Subject: RE: [PHP-WIN] Alternative methods for storing uploaded images?
Jacob, I have a gallery i created with a Java template, PHP, and MYSQL. In the admin section you create category's and upload the images to a folder eg: Pictures On upload the script water marks and creates Thumb nails for use in the gallery. http://www.helenshappyhome.co.uk/gallery.php Visitors can then select what gallery they wish to view, and the PHP pulls the relevant images Before i did this, i did a lot of looking into it and was advised using the DB to store the image/binary would be a big no on performance of the site. I do not know how true this is. BR, Gav Skype : squidge1980 -----Original Message----- From: Jacob Kruger [mailto:jacobk@mailzone.co.za] Sent: 10 May 2012 19:08 To: php-windows@lists.php.net Subject: [PHP-WIN] Alternative methods for storing uploaded images? Just wondering if it's better to either store uploaded images, via something like a form of CMS, in a static folder, with a unique name based on something like the data record's id field, when keeping track of it's location like that, or is it better to actually store the binary data of the image file in the mySQL database itself, and then sort of stream it back out when displaying the image, and if so, would presume that would be relatively simple to implement, but, OTOH, if you were then using the data to then render static content output for later use, it would, obviously, be better to keep the image content static as well...? Thoughts/examples? Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...'