Direct Amazon Uploader - PostBack after UploadComplete

Jan 28, 2009 at 4:08 PM
Hello,

I am using the ConfirmUpload event to save the file to the database, and after that I need to cause a PostBack to update a GridView. I have tried using the FileStateChanged to force a PostBack (use javascript to click a button, which binds the grid), but FileStateChanged happens before ConfirmUpload, not to mention that the ConfirmUpload event never fires because of the PostBack. So basically, I'm wondering if there is any way I can cause a PostBack after ConfirmUpload has fired. Thanks in advance.

-- Ryan Triggs
Coordinator
Jan 28, 2009 at 5:20 PM
I have added ConfirmUploadJsFunc property that you can use like that:
<script>
    function ConfirmUploadJsFunc(r){
        alert("ConfirmUploadJsFunc: isError:"+r.isError+",isLast:"+r.isLast+",httpStatus:"+r.httpStatus+
                ",index:"+r.index+",bytes:"+r.bytes+",name:\""+r.name+"\", changedName:\""+r.changedName+"\"");
    }
</script>
<fjx:FileUploader ID="FileUploader1" runat="server">
    <Adapters>
        <fjx:DirectAmazonUploader
            OnConfirmUpload="ServerSideConfirmUpload"
            ConfirmUploadJsFunc="ConfirmUploadJsFunc" 
            AccessKey="WebConfig:AmazonAccessKey"
            SecretKey="WebConfig:AmazonSecretKey"
            BucketName="media.flajaxian.com"  />
    </Adapters>
</fjx:FileUploader>

Get the latest source from same place.
Jan 28, 2009 at 5:22 PM
Awesome! Thanks!