SWFUpload ASP.Net example site not working?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 11:29:11

问题


http://swfupload.org/node/7/release

The .Net 2.0 sample is not working, has anyone faced the same thing and have been able to make it work?

The solution is compiling and the default page is opening normal in FireFox but when I click on the button nothing happen, and in IE the button is not appearing at all


回答1:


A few things note with the SWFUploader is that although there is a .Net test project it is a little miss leading and does a lot more than is really required, its great if you want to upload images but dosn't have the progress bar or allow file uploads.

Make sure you get the source code form http://code.google.com/p/swfupload/ not the site, this will fix any issues you have with version 10 / 11 of flash not working.

To get any of the PHP demo working with .Net just make a file called upload.aspx to replace the upload.php with the following code in.

try
    {
        // Get the data
        HttpPostedFile postedfile = Request.Files["Filedata"];

        postedfile.SaveAs(Server.MapPath(".\\") + postedfile.FileName);

    }
    catch
    {
        // If any kind of error occurs return a 500 Internal Server error
        Response.StatusCode = 500;
        Response.Write("An error occured");
        Response.End();
    }
    finally
    {

        Response.End();
    }

Change the the default page name to html or .aspx and change the call inside to your new save script.

It will now save the files in the root of the website.




回答2:


I was having this issue but what fixed it for me was getting the newest version of the swfupload controls. I didnt realize that the stuff you download off google source had the .net stuff in it as well, i was using the out of date controls off the .net page on their website.

if you go to http://code.google.com/p/swfupload/ get the "SWFUpload [version number] Samples.zip" and it has .net stuff in it, which i was able to get working just fine.




回答3:


i got it, because my Flash version is 10 and SWF is not working with Flash player 10 as its not allowed in Flash player 10 to call a swf file, so the solution for that i putting the object its self on the page and make it as a button to make the user click on the object its self.



来源:https://stackoverflow.com/questions/623778/swfupload-asp-net-example-site-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!