由于客户项目需求
网站中需要同时上传多达上千张的图片
现在使用的是用一个一个fileupload一次次地选择一张张来同时上传,但这样做很不人性化,显得有点繁琐
也想过用上传rar的方式来上传,但由于图片需要与数据库同步,这样又好像不行所以想请假各位大侠,有什么好的方法建议,或者有什么好的主键可以介绍
小弟在这里谢谢了先PS:fileupload或file控件是不是都不能一次打开同时选择多个文件,如果可以的话,是不是需要在哪里进行修改?
网站中需要同时上传多达上千张的图片
现在使用的是用一个一个fileupload一次次地选择一张张来同时上传,但这样做很不人性化,显得有点繁琐
也想过用上传rar的方式来上传,但由于图片需要与数据库同步,这样又好像不行所以想请假各位大侠,有什么好的方法建议,或者有什么好的主键可以介绍
小弟在这里谢谢了先PS:fileupload或file控件是不是都不能一次打开同时选择多个文件,如果可以的话,是不是需要在哪里进行修改?
解决方案 »
- 关于ASP.NET数据保存TXT
- SQL中Select_Help me(跪求)
- 在使用ORM做实体映射的时候碰到的一点问题
- 谁能给个第三方颜色控件
- 关于向这个https://graph.qq.com/t/add_pic_t接口提交数据的问题
- 送分,win2003服务器运行asp.net2.0程序,要装什么,要注意什么?
- 关于asp.net的运行,我的理解是不是错了?帮我看看,谢谢!
- 我怎么得不到更新后的数据??
- 用VS.NET开发WEB APPLICATION的简单问题?
- 配置了Active Directory(及主域控制器,DNS),与VS.NET有没有冲突?
- C# WEB 创建IIS虚拟目录报错:“未知名称。 (异常来自 HRESULT:0x80020006 (DISP_E_UNKNOWNNAME)) ”
- 求Udp协议一个简单例子
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
楼上说的似乎和http的通讯模式冲突。
另外建议图片都要用程序压缩下,通常楼主的这种情况都是直接数码相机的图片,这要是直接就弄上去简直就是个灾难.
一种win+fpt
另一种上传压缩包感觉还是第一种性能好,可是小弟对win+fpt没怎么接触,可否求教个例题研究下
是用 Flex 做的
界面是flash。可以一次多选 很多文件 然后 点击上传会调用 方法 剩下的都没什么问题了。
不过只有英文版 和繁体版的
http://www.codeproject.com/KB/aspnet/FlashUpload.aspx
Asp.Net 2.0 实现多文件上传的方法 http://www.cnblogs.com/wayne-ivan/archive/2008/04/23/1168282.html
我自己用的时候都去掉了 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>
<?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>
所以想在这看看谁有,发个来看看