I am making a file upload system and I would like to ask one thing about it. Here is how it works at the moment:

1. You select the file and upload it with the fileReference.upload(path/to/upload.php).

2. On DataEvent.UPLOAD_COMPLETE_DATA the upload.php returns a xml data with file properties like new fileName, filePath, fileUrl etc

which I pass to a php service which writes the data to a database along with other stuff.

My question here is: Is it possible for someone to interupt this chain of events. By this I mean - is it possible for the file to get uploaded but the service which writes the data to the database to never be executed. For example if the user closes the browser at 100% video upload right after it's uploaded and right before the service is called? This would cause the file to be uploaded and the system wouldn't know about it and the server might get overloaded with files that don't exist in the system.

I guess the question to this answer is like asking if on web browser's unload event you call ExternalInterface to call a function in flash which executes an http request before closing. I am not sure that it's the same thing though!

Would both examples work ? Is it 100% guaranteed that they won't sometimes fail to execute?