Hi,
Maybe you should try to use
HashAlgorithm for you purposes. Hash values are got from source files, even if you don't send them.
In upload script you can identify your originals and thumbnails by the same hash value.
Let me know if there will be any troubles.
Best regards,
Eugene Kosmin.
Aurigma Development Team