Look at the javascript at the top of that file. See this block, at the end of the script tag?
function init()
{
kw(function ()
{
if (kw.support.dragDrop)
document.getElementById("dropInstructions").style.display = "block";
kw("<%=slickUpload.ClientID %>").start();
});
}
This is the init function that will be called as soon as SlickUpload is initialized. If you're familar with jQuery, the kw function is like $. In other words, if you pass it a function, it will be called on document ready (or immediately, if the document is already ready). If you pass it a string, it will return the component.
For the Slick sample, .start() is called on init, to start the uploading process (rather than the user needing to hit a start button manually). This is why adding AutoCompleteAfterLastFile="true" is causing the reload loop -- the upload process starts on page init, determines that it has no remaining files to upload, and posts back.
It sounds like you want to have the opposite functionality -- users pick files, click submit, then the upload starts. This is how all of the other samples are done. You'll basically want to do three things:
- Set AutoCompleteAfterLastFile="true" and AutoUploadOnSubmit="true" on the UploadConnector control. This will set up the control to complete after the last file, and start uploading when anything on the page tries to post back the page.
- Remove the .start() line so the control doesn't start uploading too early
- Add a button to start the upload. You can use any normal ASP.NET runat=server Button/LinkButton that causes a postback, or you can copy that .start() call to your click handler rather than having it get called on init.
Let me know if you have any other questions.