ryanlin Posted April 12, 2007 Share Posted April 12, 2007 Hi, I am just wondering whether I am able to extract EXIF information from photo before actually uploading it to the server. Because I have to do some validation whether user can actually upload that picture using EXIF info. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/46674-solved-extract-exif-information-before-uploading/ Share on other sites More sharing options...
kenrbnsn Posted April 12, 2007 Share Posted April 12, 2007 You can't. At least not with PHP. Before PHP can do anything with a file, it must be uploaded to the server. After it's been uploaded you can do any tests you want. Ken Quote Link to comment https://forums.phpfreaks.com/topic/46674-solved-extract-exif-information-before-uploading/#findComment-227399 Share on other sites More sharing options...
ryanlin Posted April 12, 2007 Author Share Posted April 12, 2007 I expected this answer. I am finding a solution actually to solve this and below is the first one I come up with - User upload the picture to a temporary folder > validate the EXIF info > if correct the picture will be move to permanent folder, if not I will set the cronjob or with php, I will delete all the images inside that temporary folder at a time interval, let say every 5mins . What do you think about this solution? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/46674-solved-extract-exif-information-before-uploading/#findComment-227402 Share on other sites More sharing options...
kenrbnsn Posted April 12, 2007 Share Posted April 12, 2007 That's ok, but why bother with a cron job? If the file can't be used, let the PHP script delete it using the unllink() function. Ken Quote Link to comment https://forums.phpfreaks.com/topic/46674-solved-extract-exif-information-before-uploading/#findComment-227403 Share on other sites More sharing options...
ryanlin Posted April 12, 2007 Author Share Posted April 12, 2007 Ok ken, Yeah, I will heed your advice. Thanks Ryan Quote Link to comment https://forums.phpfreaks.com/topic/46674-solved-extract-exif-information-before-uploading/#findComment-227406 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.