Hello,

I was wondering what's the best way to prevent duplicate uploads - in other words, if user attempts to upload a file that is already present on the server, I want to display a nice message to the user saying that the file's already been uploaded (potentially by someone else). The main idea is to avoid wasting bandwidth.

An obvious way to do this is to calculate the checksum of the file that the user attempts to upload, so that I can see if a file with such checksum is already present on the server. But is there any way to calculate such checksum on the client side? I realize that Mozilla has some XPCOM API to access files on the browser's file system, but I'd rather go with pure SWFUpload/Flash route as using XPCOM requires the user to grant some extra privileges to the browser.

Many thanks,
Tomasz