SWFUpload ASP.Net example site not working?

后端 未结 3 1713
失恋的感觉
失恋的感觉 2021-01-16 10:44

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 c

3条回答
  •  礼貌的吻别
    2021-01-16 10:53

    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.

提交回复
热议问题