I am working with the HTML5 API ( tutorial here ) and I need to check if the file is an image or not. The main problem is that during normal boot, I could also call getimagesize(), as a parameter, the path to a temporary file, and then decide whether to save it on the server or not.
However, with the file upload API, files are obtained with php://input, which returns the actual transfer bits.
What is the best way to check in this situation? Should I store the bit in a physical location and then check it and delete after it, or is this the best way?
Thank.
source
share