Actually my current implementation is the same as in the example.
Can I have your attention for my current problem I am facing:
1. User uploads say 100 images and popup window comes up "Successfully Uploaded"
2. On the server side, images are not stored directly to working folder ("OUTBOX"), but in a temporary folder ("TEMP").
Because, there is another system which checks OUTBOX every second, if there are new images it will process them.
But when the user is uploading 100 images, it might happen that only 50 images have arrived yet, and the processing system
will process only those 50 images in a one shot, which is quite wrong as for me.
That's why I am using TEMP folder to ensure atomicity, i.e. either all 100 images are visible to the processing system, or
none is.
3. So, at this point images are in TEMP folder. But the user has already seen the "Sucessful upload" message
and he thinks that his images are permanent on the server.
4. When he clicks "OK" on popup window, I redirect him to my own page,
Where I move files from TEMP to OUTBOX to make them visible for the processing system.
But as you see, my ultimate function is not triggered unless the user clicks "OK" on popup window.
It happened that some of my users after seeing the "Sucessful upload" message, then didn't click "OK" button
They just simply left browser open or just closed it, which means, his images left on TEMP folder
and were not copied to OUTBOX.
In my opinion, my problem can be solved if you have some thing like "OnSuccessfulUpload()" trigger
where I can specify my own url action "http://....../moveImages.aspx?id=99".
So, when files are successfully uploaded to server, it will perform my url action, and then will show
"Successful Upload" message to user
I do appologize for stating you long description of my problem.Will appreciate your suggestion