DirectUploader not working

Sep 13, 2009 at 9:44 PM
Edited Sep 14, 2009 at 2:43 PM

I have just purchased your direct uploader control but can't get it to work.

I've uploaded the crosdomain.xml file to my bucket, the bucket has public read access, the xml file has read access to everyone, but when i try to upload a file, the upload does not seem to get triggered.

No javascript errors, and can't seem to find anything  in the debug info on ServerTracer.swf

please see these pages for more info:

// URLs removed by author

 

Coordinator
Sep 13, 2009 at 10:59 PM
Edited Sep 14, 2009 at 12:03 AM

Please use fiddler when debugging your code. Request back to your page returns  404 Product Not Found

 

 

Sep 14, 2009 at 11:58 AM
Edited Sep 14, 2009 at 2:44 PM

It seems like the ajax call fails:

 

POST /Product.aspx?__ID=window.ctl00_MainContentHolder_VariantsDisplay_inputTemplate1_SWFS3Upload_FileUploader1_DirAmz&&__T=DirAmz.Initial HTTP/1.1

 

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fError.aspx%3ftype%3dproduct">here</a>.</h2>
</body></html>

 

 

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fError.aspx%3ftype%3dproduct">here</a>.</h2>
</body></html>

The problem is I'm using URL rewriters, so requesting the page /testproduct.aspx will serve the page /BVModules/ProductTemplates/theme/Product.aspx with some parameters. Now the ajax call should be made to /testproduct.aspx instead of what it is currently. How can i get around this? this seems to a common enough scenario these days.

 

Sep 14, 2009 at 12:47 PM
Edited Sep 14, 2009 at 2:44 PM

 

I tracked this down to the PageUrl property of DirectAmazonUploader

The complete page url is /BVModules/ProductTemplates/theme/Product.aspx?productid=4ed16196-85cd-45ab-b1b1-d582e82434fa

I need to keep the productid in the query string in order to not get the error, so changed the method

 

public string PageUrl
        {
            get
            {
                return this.ComposePageUrl(HttpContext.Current.Request.Url.AbsoluteUri.Substring(0,
                            HttpContext.Current.Request.Url.AbsoluteUri.Length - HttpContext.Current.Request.Url.Query.Length));
            }
        }

to

 

public string PageUrl
        {
            get
            {
                return this.ComposePageUrl(HttpContext.Current.Request.Url.AbsoluteUri);
            }
        }

 

but this did not seem to change the generated URL, when I use fiddler, the request is still

POST /BVModules/ProductTemplates/CanvasPop/Product.aspx?__ID=window.ctl00_MainContentHolder_VariantsDisplay_inputTemplate1_SWFS3Upload_FileUploader1_DirAmz&&__T=DirAmz.Initial HTTP/1.1

 

 

 

Sep 14, 2009 at 2:42 PM

Resolved the issue. And after a day of playing around with your code I have to say its really well written and easy to work with. Thank you.

Coordinator
Sep 14, 2009 at 4:10 PM

Thank you