Calculate md5 hash for uploaded file