Re: Saving a BLOB image to a file (SOLVED)
| From: | Gerry Danen | Date: | Sat, 18 Feb 2006 03:28:15 +0000 |
| Subject: | Re: Saving a BLOB image to a file (SOLVED) | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230676@lists.php.net to get a copy of this message | ||
On 2/16/06, tedd <tedd@sperling.com> wrote:
> However, after given it some thought, I would imagine that one could
> get a unique generated string, create a file with that string, give
> the file the correct permissions, then pull the image from the dB and
> save, do image processing, and then reload the image into a web page,
> and delete the file without any conflict. I can envision lot's of
> users doing that simultaneously without problems. BUT, I haven't
> tried it yet!
I have used a user's IP address (dots removed) and microtime appended
to create a unique file name. The target directory is world writable.
Not the most elegant solution... I found that sometimes the file had
not been written yet and trying to display it on a page right away
resulted in file not found... Rendering the image to the screen
without saving to a file works best for me.
--
Gerry
http://portal.danen.org/