Sometimes connection problems occur during the uploading of files to server. However, such problems may be transient, and if it is the case, it would not be very convenient to interrupt the whole upload proccess and make the user start from scratch.
Image Uploader provides two properties allowing you to configure automatic upload resuming:
1
.
When resuming the upload, Image Uploader tries to resend the
whole unsuccessful request. It means that if all the files are sent in one request, they all will be sent
again, even if only the last one has failed. That is why we recommend you to send each file in a
separate request. This behavior can be set using the FilesPerOnePackageCount property. Just set it to 1
. In this case, all
successfully uploaded images will not be resent.
Another advantage of uploading files in separate requests is that it reduces the amount of memory used on the server to process the uploaded files. See the Uploading Files Sequentially and Concurrently topic for more details.
To use these properties, add the following lines to your initialization code.
<script type="text/javascript" src="iuembed.js"> </script> <script type="text/javascript"> var iu = new ImageUploaderWriter("ImageUploader", 600, 500); // ...Other params... iu.addParam("FilesPerOnePackageCount", "1"); iu.addParam("AutoRecoverMaxTriesCount", "5"); iu.addParam("AutoRecoverTimeOut", "5000"); // ...Other params... iu.writeHtml(); </script>