Amazon DirectUploader Querystring Issues

Sep 19, 2009 at 9:03 PM

Been having an issue for a long time with losing the QueryString parameters when it initializes the the AJAX calls.  On the page load, it checks for a querystring parameter and if it isnt there it redirects to another page.  When you upload a file, flajaxian makes a request to the page you are on with different querystring parameters and my parameters are gone and then the file is never uploaded.


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim s As String
        s = Me.Request.QueryString("qs")

        If s = Nothing Then
        End If

End Sub


<fjx:FileUploader ID="AmazonUploadFileUploader" runat="server" ForeColor="Black"
                        MaxFileSize="100MB" MaxFileSizeReachedMessage="Files must be smaller than {0} to upload."
                        MaxFileQueueSize="200MB" MaxFileQueueSizeReachedMessage="All the files can not be bigger than {0}."

----------------------- The response I see from fiddler and then in the page load since ?qs= isn't in there, it gets redirected to error.aspx and the file is never uploaded

POST /mydomain/webpage.aspx?__ID=ControlClientID&&__T=DirAmz.Initial HTTP/1.1

You can see that the request removes my querystring and puts the __ID and __T variables in the url.

What can i do as a workaround for this?  I need to pass these querystring parameters everytime on my pages.

Sep 21, 2009 at 1:31 PM

Hi kbende.  I'm glad that you posted on this since I'm running into the same issue on a project I am working on.  It seems like when the amazon directuploader goes to upload the file, it causes a post to the same page but the page.ispostback is always set to false.  To try to get around this I tried saving my important varibles using the FileUploader1.State.Add("MyKey", "MyValue"); and <%=FileUploader1.ClientID%>.setStateVariable("MyKey", "MyValue"); documented in the file uploader help but am not able to retrieve them.  I too need to access these query string parameters on each page load.  Is there something that I am missing also?

Oct 21, 2009 at 12:25 AM

I'm having trouble with this too. I need to pass querystring OR state variables and can do neither... can anyone help?? 

Oct 21, 2009 at 2:00 AM

Anything that is passed with the confirmation request is defined at

/js/DirectAmazonUploader.js function stateChange you can make that function to read from global varianble for example.

Then on the server side you jyst get it from this.Request.QueryString["WhateverIsYourKey"]