My question is regarding uploading photographs to a webserver.
I recently observed while uploading a photograph on facebook that it can upload (and by default it does) upload smaller photographs than what we request.
Now, I can think of uploading a full size photograph and compress when it reaches the server.
But how could facebook resize the picture while uploading.
Is there any request header (I think there is not) that asks browser to upload specific size image and manipulate the exif/jpeg data in the file.
If not, some plugin/Flash/Javascript has to read the file/images from our system. Does web standard really allow file reading from the user system?
Please advise.
Regards,
Mayank
Website / webserver cannot do anything with the image until it is uploaded and saved into target directory. It must receive fullsize image and then resite it to desired size [generate thumbnails, etc.]. There is no request header that you described.
Web standards don’t allow reading files from user hard disk. The thing that they allow is to select file from hard disk and then send to server – initiative is on the client’s side, not server’s.
Is there anything more you would like to know?
update
See this: Flash upload image resize client side
As I said – without external mechanisms we can’t do anything. But of course, if we take into account Flash, Google Gears and so on, everything is possible.