Hi Robert,
>> Is there a way to cancel an upload file? If I check on RenameFile embed the file and if it's not the extension we want how to cancel the upload?
The only any to cancel the upload would be to close the connection to the browser. Which means an error page would appear on the browser, which is probably not a good idea. I'm not aware of any pre-emtive message you can send the browser saying "hey, you're sending me a big file, but please stop..."
Of course, by the time you've got to the RenameFile method the whole file has already arrived, so that wouldn't be the place to do it anyway.
Cheers
Bruce