class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
No, what I am saying is that you can either: - call process() once, without any argument, in order to get the image content, and store in in the database. - call process() a first time to store the file on disk, and then call it a second time to store the image in the database.
You probably want the first solution, since I don't think that you need to also store the file on disk. You don't need to store the file on disk to read it back and store it in the database. Calling process() without argument does that for you (without even storing the image on disk).
And if you like the class so much, feel free to spread the word about it! And if you like my response time, also feel free to support the class by donating ;)Reply
- call process() once, without any argument, in order to get the image content, and store in in the database.
- call process() a first time to store the file on disk, and then call it a second time to store the image in the database.
You probably want the first solution, since I don't think that you need to also store the file on disk. You don't need to store the file on disk to read it back and store it in the database. Calling process() without argument does that for you (without even storing the image on disk).
And if you like the class so much, feel free to spread the word about it! And if you like my response time, also feel free to support the class by donating ;)