由于客户项目需求
网站中需要同时上传多达上千张的图片
现在使用的是用一个一个fileupload一次次地选择一张张来同时上传,但这样做很不人性化,显得有点繁琐
也想过用上传rar的方式来上传,但由于图片需要与数据库同步,这样又好像不行所以想请假各位大侠,有什么好的方法建议,或者有什么好的主键可以介绍
小弟在这里谢谢了先PS:fileupload或file控件是不是都不能一次打开同时选择多个文件,如果可以的话,是不是需要在哪里进行修改?

解决方案 »

  1.   

    Upload multiple files Hotmail style by Kwame Hubbard (CodeProject) 
    http://www.codeproject.com/KB/aspnet/multiuploads.aspxAllowing Users to Upload Multiple Files at Once by Donny Mack (DotNetJunkies) 
    http://www.dotnetjunkies.com/Tutorial/81E0C3A9-1B40-425C-B150-B578FE724A39.dcikUploading Files Using the File Field Control by Bill Evjen (MSDN) 
    http://msdn.microsoft.com/en-us/library/aa478971.aspxUploading Multiple Files in ASP.NET 2.0
    http://www.dotnetcurry.com/ShowArticle.aspx?ID=68
      

  2.   

    用ftp上传,然后写个winform程序,定时去ftp目录检索,如果有图片就输入数据库
      

  3.   

    说个思路,不知道对不对,我也不知道怎么实现读取图片所在目录的所有文件的路径及文件名,然后保存到服务器上的一个text文件里,再循环读取这个text文件列表,在循环中得到文件径,文件名什么的,然后上传!理论应该可行!不知道我说的对不对,别笑话!
      

  4.   

    FTP通过ActiveX
    楼上说的似乎和http的通讯模式冲突。
      

  5.   

    还是用winform加ftp的方式吧,走http的话很容易死掉或者超时.
    另外建议图片都要用程序压缩下,通常楼主的这种情况都是直接数码相机的图片,这要是直接就弄上去简直就是个灾难.
      

  6.   

    多文件上传&上传多个文件...up
      

  7.   

    还是做一个win的ftp上传工具,让用户下载安装。
      

  8.   

    学习以前只做过几十张的同时上传,几千张同时上传估计真的要用WINFORM做个FTP了
      

  9.   

    用ftp上传(很多图片)到一个指定的目录(或者是在ftp上为用户建立的私人目录)。上传完成后,让用户在web页面上点一个按钮。。目的是让服务器去搜索用户上传目录下的文件 然后写到服务器上。
      

  10.   

    你上传RAR或ZIP然后解压缩到那个文件夹去检索再插入到数据库中,这应该是最好的办法!
      

  11.   

    综合各位的意见,看来分两种方法
    一种win+fpt
    另一种上传压缩包感觉还是第一种性能好,可是小弟对win+fpt没怎么接触,可否求教个例题研究下
      

  12.   

    我有好东西 你要吗?包你满意
    是用 Flex 做的
    界面是flash。可以一次多选 很多文件 然后 点击上传会调用 方法 剩下的都没什么问题了。
    不过只有英文版 和繁体版的 
      

  13.   

    那我直接給你原版地址吧 你下載之后 自行修改就好啦
    http://www.codeproject.com/KB/aspnet/FlashUpload.aspx
      

  14.   

    作者也提供了 flash 的源文件 你可以自行改成簡體中文版
      

  15.   

    没做过一次上传这么多的,不过有一个方法,就是找出一个文件夹下面的所有图片(DirectoryInfo这个可以做到),然后每张读成流new一个fileupload上传!
      

  16.   

    没做过一次上传这么多的,不过有一个方法,就是找出一个文件夹下面的所有图片(DirectoryInfo这个可以做到),然后每张读成流new一个fileupload上传!
      

  17.   

    仿163网盘无刷新多文件上传系统下载http://www.aspxhome.com/download/javascript/200810/497220.htm
      

  18.   

    仿163网盘无刷新文件上传系统 http://www.cnblogs.com/cloudgamer/archive/2008/10/20/1314766.html
    Asp.Net 2.0 实现多文件上传的方法 http://www.cnblogs.com/wayne-ivan/archive/2008/04/23/1168282.html
      

  19.   

    不错,功能挺全的,但使用这个控件是不是要在config里配置些什么?
      

  20.   

    他配置的那些主要是 身份验证要的
    我自己用的时候都去掉了  config 里就这么多:<?xml version="1.0"?>
    <!-- 
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config 
    -->
    <configuration>  <appSettings/>
    <connectionStrings>
    <add name="ConnectionString" connectionString="Server=RAY-PC;Database=CSRDB;uid=sa;pwd=sa;"/>
    <add name="ConnectionEIP" connectionString="Server=RAY-PC;Database=EIP2;uid=sa;pwd=sa;"/>
    </connectionStrings>
      <system.web>
          <!-- 
              Set compilation debug="true" to insert debugging 
              symbols into the compiled page. Because this 
              affects performance, set this value to true only 
              during development.
          -->
          <compilation debug="true">
          </compilation>
          <!--
              The <authentication> section enables configuration 
              of the security authentication mode used by 
              ASP.NET to identify an incoming user. 
          -->      <!-- 
            Settings for demonstrating the use of forms authentication.  The custom
            membership is defined in App_Code/CustomMembership.cs and returns true 
            in ValidateUser, so any username and password will result in a successful
            login (obviously you wouldn't want this for a real application, this is
            just to show forms authentication in action.
          -->
          <membership defaultProvider="FlashUploadProvider">
            <providers>
              <add name="FlashUploadProvider" type="CustomMembership" />
            </providers>
          </membership>
        
         
        
          <!-- 
            Set Sessions to cookieless if you need to retrieve session data 
            in the upload handler (configure below in the httphandlers section 
            and defined in App_Code/Upload.cs) 
          -->
          
          <!--
              The <customErrors> section enables configuration 
              of what to do if/when an unhandled error occurs 
              during the execution of a request. Specifically, 
              it enables developers to configure html error pages 
              to be displayed in place of a error stack trace.      <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
              <error statusCode="403" redirect="NoAccess.htm" />
              <error statusCode="404" redirect="FileNotFound.htm" />
          </customErrors>
          -->    <httpHandlers>
          <!-- 
            The httpHandler that files are uploaded to, defined in App_Code/Upload.cs
          -->
          <remove verb="POST,GET" path="Upload.axd"/>
          <add verb="POST,GET" path="Upload.axd" type="Upload"/>
          <remove verb="POST,GET" path="Upload2.axd"/>
          <add verb="POST,GET" path="Upload2.axd" type="Upload"/>
        </httpHandlers>
        <!-- 
            The maximum files size allowed
          -->
        <httpRuntime maxRequestLength="1550000"/>
        <customErrors mode="Off" />
      </system.web>  <!-- 
        settings to allow anonymous users to see the login page.
      -->
     
    </configuration>
      

  21.   


    <?xml version="1.0"?>
    <!-- 
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config 
    -->
    <configuration>  <appSettings/>
    <connectionStrings>
    <add name="ConnectionString" connectionString="Server=RAY-PC;Database=CSRDB;uid=sa;pwd=sa;"/>
    <add name="ConnectionEIP" connectionString="Server=RAY-PC;Database=EIP2;uid=sa;pwd=sa;"/>
    </connectionStrings>
      <system.web>
          <!-- 
              Set compilation debug="true" to insert debugging 
              symbols into the compiled page. Because this 
              affects performance, set this value to true only 
              during development.
          -->
          <compilation debug="true">
          </compilation>
          <!--
              The <authentication> section enables configuration 
              of the security authentication mode used by 
              ASP.NET to identify an incoming user. 
          -->      <!-- 
            Settings for demonstrating the use of forms authentication.  The custom
            membership is defined in App_Code/CustomMembership.cs and returns true 
            in ValidateUser, so any username and password will result in a successful
            login (obviously you wouldn't want this for a real application, this is
            just to show forms authentication in action.
          -->
          <membership defaultProvider="FlashUploadProvider">
            <providers>
              <add name="FlashUploadProvider" type="CustomMembership" />
            </providers>
          </membership>
        
         
        
          <!-- 
            Set Sessions to cookieless if you need to retrieve session data 
            in the upload handler (configure below in the httphandlers section 
            and defined in App_Code/Upload.cs) 
          -->
          
          <!--
              The <customErrors> section enables configuration 
              of what to do if/when an unhandled error occurs 
              during the execution of a request. Specifically, 
              it enables developers to configure html error pages 
              to be displayed in place of a error stack trace.      <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
              <error statusCode="403" redirect="NoAccess.htm" />
              <error statusCode="404" redirect="FileNotFound.htm" />
          </customErrors>
          -->    <httpHandlers>
          <!-- 
            The httpHandler that files are uploaded to, defined in App_Code/Upload.cs
          -->
          <remove verb="POST,GET" path="Upload.axd"/>
          <add verb="POST,GET" path="Upload.axd" type="Upload"/>
          <remove verb="POST,GET" path="Upload2.axd"/>
          <add verb="POST,GET" path="Upload2.axd" type="Upload"/>
        </httpHandlers>
        <!-- 
            The maximum files size allowed
          -->
        <httpRuntime maxRequestLength="1550000"/>
        <customErrors mode="Off" />
      </system.web>  <!-- 
        settings to allow anonymous users to see the login page.
      -->
     
    </configuration>
      

  22.   

    或者你学QQ空间上传照片的方式,做个activex控件来配合。
      

  23.   

    呵呵,就是没做过ACTIVEX控件
    所以想在这看看谁有,发个来看看