Re: Dupe file check using MD5?

From: Date: Thu, 27 Jul 2000 20:59:09 +0000
Subject: Re: Dupe file check using MD5?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8663@lists.php.net to get a copy of this message
Starting with the off topic first: I don't believe JavaScript has the ability to access files, (for security purposes) and you want to make an MD5 hash of the whole file, or just the filename? Ed ""Some Guy"" <thatphpguy@hotmail.com> wrote in message news:20000727070713.4735.qmail@hotmail.com... > I have an upload script. I would like to compare a file uploaded with a data > base entry for dupes. > > I thought I could use the md5 function to generate a hash of each file and > enter it in a database but the md5 function takes a variable not a file. > > Any ideas how a md5 hash can be generated on a uploaded fle. > > Files could be gifs,zips or doc files or many others including text files so > it has to be binary safe and text safe. > > How safe is this for comparing for dupes and anyone have stats on the chance > it would have the same hash for a non dupe. On a off topic idea. Anyone know > if there is a javascript way to read a file on the client side and generate > a MD5 hash. I could then pass it in a hidden field before the upload. Saving > the upload time if its already on the server. > > Thanks > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#8663) next »