Hey all!
I can't get this thing to work in FireFox (ASP.net version)!
It works perfectly in IE6, IE7 but not in FireFox. I can get it to "upload", but the file is never actually posted some where - Not in my project and not in the demo either? In the demo, the file seems to be uploaded, but the thumbnail wont show up. Is there any solution of this problem?
Any ideas?
Would REALLY appreciate help with this...
Regards
Kristofer
Could be lots of things
Could be you have some HttpModule intercepting things.
Could be you have some funny FireFox extension.
Could be you have cookies disabled.
Without more detailed information it's really hard to tell.
It sounds like a Session issue. Flash Player in Firefox doesn't send the right session cookies. The Global.asax tries to work around this.
I'll assume you have IIS configured correctly, you are using a vanilla Firefox installation, no HttpModules (or anything like that) and that you have Visual Studio 2005. The first thing I'd do is setup a web site project in Visual Studio, make sure it compiles and put some break points in the global.asax and the upload.aspx. Use the Locals and Autos windows to make sure a file is posted.
Step through the global.asax. It's purpose is to override the Session and Authentication Cookies so both are properly restored since the Flash Player plug-in doesn't send the right cookies out of Firefox. SWFUpload needs to send the contents of these cookies in the post_params setting.
Step through the upload.aspx to see if the file is being loaded, processed, and stored in the session (this has to be the same session as restored by global.asax).
Step through the thumbnail.aspx. It is supposed to dynamically stream the thumbnail data (stored in session) to the browser. Make sure this is happening and that ASP.Net isn't adding any output (thereby corrupting the image file).
I think it's working
I think it's working now...
The problem was a session-variable which was lost during the call to upload.aspx. Only in FireFox though...
I passed this variable through a querystring instead and now it seems to work.
A bit tired I guess.
THANK YOU FOR YOUR REPLY!
Code needed for Firefox
I can't get this demo to work in FF. Can you post some code please k0ffeh ?
Thanks in advance.
>>The problem was a session-variable which was lost during the call to upload.aspx. Only in FireFox though...
>>I passed this variable through a querystring instead and now it seems to work
In the download packet there
In the download packet there is an Application Demo for ASP.Net (2.0). It includes all the code you need for using SWFUpload with ASP.Net and includes some bug work-arounds in the Global.asax which properly restore sessions and forms authentication cookies.
The only thing it doesn't do is actually save the file (it just generates a thumbnail which is stored in a session variable).
However, saving uploads is outside the scope of SWFUpload. You should refer to whatever documentation is provided for your server side technology for saving uploaded files.
Here is an ASP.Net snippet:
HttpPostedFile posted_file = Request.Files["Filedata"];
posted_file.SaveAs(@"c:\websiteuploads\" + System.IO.Path.GetFileName(posted_file.FileName));
Where is Global.asax
Gyphie,
I don't seem to see a global.asax file in the download. Can you please provide that as I need to have Firefox support for this.
Thank you!
There is a global.asax in
There is a global.asax in the download package (v2.0.2)
swfupload/demos.applicationdemo.net/global.asax
I got a solution
I was running into this exact same issue.
IE6/IE7 would upload and display thumbnails.
When I did this in Firefox 3 it would "create thumbnail" and then say completed, but no thumbnail would display. A img would be created with an id, but nothing would show.
After moving the uploader all through my site it was still happening.
I applied the Global.asax and then made sure the upload.aspx had access by everyone and it worked.
putting hair back in, after ripping it out>.