SWFUpload ASP.Net示例站点无法正常工作?

时间:2022-08-29 16:38:33

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?

.Net 2.0示例无法正常工作,是否有人面对同样的事情并且能够使其工作?

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

解决方案正在编译,默认页面在FireFox中打开正常但是当我点击按钮时没有任何事情发生,并且在IE中按钮根本没有出现

3 个解决方案

#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.

SWFUploader的一些注意事项是,虽然有一个.Net测试项目,它有点缺失领先并且做的比实际需要的要多得多,如果你想上传图片但没有进度条或允许文件上传。

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.

请确保您获得的源代码形式为http://code.google.com/p/swfupload/而不是网站,这将解决您在版本10/11的闪存无法正常工作时遇到的任何问题。

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.

要使用.Net的任何PHP演示,只需创建一个名为upload.aspx的文件,用以下代码替换upload.php。

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.

将默认页面名称更改为html或.aspx,并将内部调用更改为新的保存脚本。

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.

我遇到了这个问题,但是为我修复的是获取最新版本的swfupload控件。我没有意识到你从谷歌源下载的东西也有.net的东西,我在他们的网站上使用.net页面上的过时控件。

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.

如果你去http://code.google.com/p/swfupload/获取“SWFUpload [版本号] Samples.zip”并且它中有.net内容,我能够正常工作。

#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.

我明白了,因为我的Flash版本是10而且SWF不能与Flash播放器10一起工作,因为它不允许在Flash播放器10中调用swf文件,所以解决方案是我把对象自己放在页面上然后制作它作为一个按钮,使用户点击它自己的对象。

#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.

SWFUploader的一些注意事项是,虽然有一个.Net测试项目,它有点缺失领先并且做的比实际需要的要多得多,如果你想上传图片但没有进度条或允许文件上传。

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.

请确保您获得的源代码形式为http://code.google.com/p/swfupload/而不是网站,这将解决您在版本10/11的闪存无法正常工作时遇到的任何问题。

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.

要使用.Net的任何PHP演示,只需创建一个名为upload.aspx的文件,用以下代码替换upload.php。

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.

将默认页面名称更改为html或.aspx,并将内部调用更改为新的保存脚本。

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.

我遇到了这个问题,但是为我修复的是获取最新版本的swfupload控件。我没有意识到你从谷歌源下载的东西也有.net的东西,我在他们的网站上使用.net页面上的过时控件。

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.

如果你去http://code.google.com/p/swfupload/获取“SWFUpload [版本号] Samples.zip”并且它中有.net内容,我能够正常工作。

#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.

我明白了,因为我的Flash版本是10而且SWF不能与Flash播放器10一起工作,因为它不允许在Flash播放器10中调用swf文件,所以解决方案是我把对象自己放在页面上然后制作它作为一个按钮,使用户点击它自己的对象。