I have a unique situation. I am creating a MySQL-based photo gallery (I know, it's been done, but I'm teaching myself PHP and MySQL and need a project).
Here's the situation: I can upload a JPG and store the binary data in the database. I can take that uploaded file and make a thumbnail out of it and display the thumbnail to the screen. What I would like to do is make a thumbnail and store that in another table. The main problem is that I do NOT have file-level write access (beyond initially uploading the file to the /tmp directory) so I cannot write the thumbnails to disk and then open that file and store it in the database (or just save them to disk and store the location info).
The other problem is that I cannot make a thumbnail from the JPEG data stored in the database because all the functions for image manipulation seem to require a file on disk, so I cannot create thumbnails on the fly from data in the DB.
Can anyone help with this? I either need to a) be able to store a thumbnail created with ImageJPEG directly to the database or b) create and display a thumbnail from data in the database, all without writing to disk. Is there a way or am I going to be stuck without thumbnails?
Thanks in advance and apologies if this is a repeat question.
Aaron
Here's the situation: I can upload a JPG and store the binary data in the database. I can take that uploaded file and make a thumbnail out of it and display the thumbnail to the screen. What I would like to do is make a thumbnail and store that in another table. The main problem is that I do NOT have file-level write access (beyond initially uploading the file to the /tmp directory) so I cannot write the thumbnails to disk and then open that file and store it in the database (or just save them to disk and store the location info).
The other problem is that I cannot make a thumbnail from the JPEG data stored in the database because all the functions for image manipulation seem to require a file on disk, so I cannot create thumbnails on the fly from data in the DB.
Can anyone help with this? I either need to a) be able to store a thumbnail created with ImageJPEG directly to the database or b) create and display a thumbnail from data in the database, all without writing to disk. Is there a way or am I going to be stuck without thumbnails?
Thanks in advance and apologies if this is a repeat question.
Aaron