23) Handling Upload Failure with and without Partial Uploads.

 

back to main index

 

Below, are some examples of using Xload to handle complex environments and results of file uploads. Each example shows one way to deal with each situation and there are other ways in which each scenario can be dealt with using Xload. How you deal with each scenario really depends upon your specification of what result you want to give the user which can be very varied. Remember, when partial uploads are NOT being allowed then any IO Error that occurs will halt the upload and put the system back to before the upload took place (IOException being thrown by the upload() method). When partial uploads ARE being allowed then when some IO Error occurs it just becomes another type of upload failure for a file upload if it occurred while uploading or writing the file.

 

Examples:

 

1.   Upon any type of upload failure, show generic error message and delete all file deployments. NO partial uploads allowed.

 

2.  Upon any type of upload failure, show generic information for each failed upload and do not delete all file deployments. NO partial uploads allowed.

 

3.  Handling upload failure specifically, giving the user fine grained results as to why uploads have failed. NO partial uploads allowed.

 

4.  Upon any type of upload failure, show generic information for each failed upload and do not delete all file deployments. Partial uploads ARE being allowed.

 

5.  Handling upload failure specifically, giving the user fine grained results as to why uploads have failed. Partial uploads ARE allowed.

 

 

 

 

 

© Gubutech(Xload) 2006  (v1.2)