Hi,
I'm not sure how megaupload did it, but it's not doable as far as I'm aware. Unless it was using a hidden Flash element to read the information somehow.
It is possible to adjust the script to not store duplicate files however it's a big job to amend the code. i.e. when someone deletes a...