- 浏览: 69736 次
- 性别:
- 来自: 本溪
文章分类
最新评论
-
x放羊的星星:
操作无法完成 feature is not available ...
SQL Server 2008导入DBF文件中的数据 -
chembo:
为什么右侧会有一条竖虚线?
Eclipse 配色方案 -
xiaguobing:
哥,好人做到底呗。求包啊!呵呵
Spring MVC 与 Ajax -
fireflyman:
兄弟,建議你看看這篇東東http://fireflyman.i ...
电子政务的价值 -
jshmemory:
太感谢了。。。
Rails2.0.2分页插件
A file upload request comprises an ordered list of items that are encoded according to RFC 1867 , "Form-based File Upload in HTML". FileUpload can parse such a request and provide your application with a list of the individual uploaded items. Each such item implements the FileItem interface, regardless of its underlying implementation.
一个文件上传请求由一个根据RFC1867,“HTML中基于表单的文件上传",编码的有序列表组成。FileUpload能够解析这样的一个请求并且为你的应用程序提供一个由单个的已经传上来的项目组成的列表。每一个这样的项目都实现了FileItem接口,无论其底层实现细节。
This page describes the traditional API of the commons fileupload library. The traditional API is a convenient approach. However, for ultimate performance, you might prefer the faster Streaming API .
本页描述组建库的传统API,这是便捷的方法。然而,为了极速的性能,你应当选择更快的Streaming API。
Each file item has a number of properties that might be of interest for your application. For example, every item has a name and a content type, and can provide an InputStream to access its data. On the other hand, you may need to process items differently, depending upon whether the item is a regular form field - that is, the data came from an ordinary text box or similar HTML field - or an uploaded file. The FileItem interface provides the methods to make such a determination, and to access the data in the most appropriate manner.
每一个文件项都有许多你的应用也许会感兴趣的属性。例如,每一个项目都有一个名字和内容类型,并且能够提供一个InputStream对象来访问其数据。另一方面,你也可以用不同的方式处理项目,取决于该项目是否为一个普通的表单域-即,数据是来自普通的文本框或者类似的HTML域,还是一个传上来的文件。FileItem接口提供作出此类判断和以最合适的方式访问其数据的方法。
FileUpload creates new file items using a FileItemFactory. This is what gives FileUpload most of its flexibility. The factory has ultimate control over how each item is created. The factory implementation that currently ships with FileUpload stores the item's data in memory or on disk, depending on the size of the item (i.e. bytes of data). However, this behavior can be customized to suit your application.
FileUpload使用FileItemFactory来创建新的文件项目。这是FileUpload所具有的灵活性的关键。该工厂类具有如何创建每个项的最终控制权。与FileUpload组建一同发布的该工厂类的实现根据该项目的大小(即数据的字节数)将具体项目的数据存储于内存或硬盘。然而,本行为也可被定制化以适合你的应用。
Parsing the request(解析请求)
Before you can work with the uploaded items, of course, you need to parse the request itself. Ensuring that the request is actually a file upload request is straightforward, but FileUpload makes it simplicity itself, by providing a static method to do just that.
在你能够使用上传来的项目之前,你理所应当地需要解析该请求本身。保证此请求确实是一个文件上传请求是直白的,但是FileUpload通过提供一个静态方法来完成它使其变得简单。
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
Now we are ready to parse the request into its constituent items.
现在我们准备将该请求解析成构成项目。
The simplest usage scenario is the following:
最简单的使用场景如下:
* Uploaded items should be retained in memory as long as they are reasonably small.
只要他们足够小,上传的项目将被存在内存。
* Larger items should be written to a temporary file on disk.
更大的项目应当被写到硬盘中的临时文件。
* Very large upload requests should not be permitted.
非常大的上传请求不应当被允许。
* The built-in defaults for the maximum size of an item to be retained in memory, the maximum permitted size of an upload request, and the location of temporary files are acceptable.
关于一个项目的最大内存存储大小,最大允许上传请求大小和临时文件的存储路径的缺省值是可接受的。
Handling a request in this scenario couldn't be much simpler:
处理一个此类应用场景的请求不可能比如下代码更简单的了:
// Create a factory for disk-based file items
FileItemFactory factory = new DiskFileItemFactory();
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
List /* FileItem */ items = upload.parseRequest(request);
That's all that's needed. Really!
这就是所需要的全部,真的!
The result of the parse is a List of file items, each of which implements the FileItem interface. Processing these items is discussed below.
解析的结果是一个文件项目的列表,每一个项目都实现了FileItem接口。下面将要处理这些项目。
Exercising more control(行使更多控制)
If your usage scenario is close to the simplest case, described above, but you need a little more control, you can easily customize the behavior of the upload handler or the file item factory or both. The following example shows several configuration options:
若你的使用场景类似于上述最简单的事例,但是你需要更多一点的控制,你可以定制上传处理器或文件项目工厂的行为甚或定制两者。以下代码示例展示了几种配置选项:
// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory();
// Set factory constraints
factory.setSizeThreshold(yourMaxMemorySize);
factory.setRepository(yourTempDirectory);
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Set overall request size constraint
upload.setSizeMax(yourMaxRequestSize);
// Parse the request
List /* FileItem */ items = upload.parseRequest(request);
Of course, each of the configuration methods is independent of the others, but if you want to configure the factory all at once, you can do that with an alternative constructor, like this:
当然,每一个配置方法都独立于其它方法,但是,若你需要一次对项目工厂进行配置,你可以使用一个替代性的构建方法:
// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory(
yourMaxMemorySize, yourTempDirectory);
Should you need further control over the parsing of the request, such as storing the items elsewhere - for example, in a database - you will need to look into customizing FileUpload.
如果你需要对请求的解析进行进一步的控制,比如将项目存储于其它地方-例如,存到数据库中,你需要查阅定制化FileUpload.
Processing the uploaded items
处理上传项目
Once the parse has completed, you will have a List of file items that you need to process. In most cases, you will want to handle file uploads differently from regular form fields, so you might process the list like this:
一旦解析完成,你将得到一个待处理的文件项目的列表。在多数情况下,你将需要同普通表单域不一样的处理,所以你应像这样来处理这个列表:
// Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
processFormField(item);
} else {
processUploadedFile(item);
}
}
For a regular form field, you will most likely be interested only in the name of the item, and its String value. As you might expect, accessing these is very simple.
对于一个常规的表单域,你最可能对该项的名字感兴趣和它的字符串值。如你所料,访问这些是非常简单的。
// Process a regular form field
if (item.isFormField()) {
String name = item.getFieldName();
String value = item.getString();
...
}
For a file upload, there are several different things you might want to know before you process the content. Here is an example of some of the methods you might be interested in.
对于一个文件上传,在你处理内容之前,有几个不同的东西需要知道。下列示例方法你也许会感兴趣。
// Process a file upload
if (!item.isFormField()) {
String fieldName = item.getFieldName();
String fileName = item.getName();
String contentType = item.getContentType();
boolean isInMemory = item.isInMemory();
long sizeInBytes = item.getSize();
...
}
With uploaded files, you generally will not want to access them via memory, unless they are small, or unless you have no other alternative. Rather, you will want to process the content as a stream, or write the entire file to its ultimate location. FileUpload provides simple means of accomplishing both of these.
对于上传的文件,你一般不会想通过内存来存取他们,除非他们非常小,或者你别无选择。你将需要将内容作为一个来处理,或者将整个文件写道它的最终位置。FileUpload提供了完成此两种情况的简单方法。
// Process a file upload
if (writeToFile) {
File uploadedFile = new File(...);
item.write(uploadedFile);
} else {
InputStream uploadedStream = item.getInputStream();
...
uploadedStream.close();
}
Note that, in the default implementation of FileUpload, write() will attempt to rename the file to the specified destination, if the data is already in a temporary file. Actually copying the data is only done if the the rename fails, for some reason, or if the data was in memory.
注意,在FileUpload的缺省实现里,write()将尝试重新命名文件到指定的位置,若数据已经在临时文件中。实际上,由于某种原因或者数据在内存中,只有在重新命名失败时才拷贝数据。
If you do need to access the uploaded data in memory, you need simply call the get() method to obtain the data as an array of bytes.
如果你需要访问上传于内存的数据,你只需要调用get()方法来获得字节数组类型的数据。
// Process a file upload in memory
byte[] data = item.get();
...
Resource cleanup
资源清理
This section applies only, if you are using the DiskFileItem . In other words, it applies, if your uploaded files are written to temporary files before processing them.
本部分只适用于使用DiskFileItem的时候。也就是说,它只适用于在处理之前,将上传文件写到临时文件中。
Such temporary files are deleted automatically, if they are no longer used (more precisely, if the corresponding instance of java.io.File is garbage collected. This is done silently by the org.apache.commons.io.FileCleaner class, which starts a reaper thread.
若不再被使用(更确切些,若相应的java.io.File实例被垃圾回收了),这些临时文件被自动删除。这由org.apache.commons.io.FileCleaner类,该类开启一个回收线程,悄悄地执行。
This reaper thread should be stopped, if it is no longer needed. In a servlet environment, this is done by using a special servlet context listener, called FileCleanerCleanup . To do so, add a section like the following to your web.xml:
这个回收线程将被关闭,如果不再需要。在一个servlet容器环境中,这些由一个特殊的被称为FileCleanerCleanup的servlet context listener监听器实现。为此,向你的web.xml文件加入如下配置段:
<web-app>
...
<listener>
<listener-class>
org.apache.commons.fileupload.servlet.FileCleanerCleanup
</listener-class>
</listener>
...
</web-app>
Creating a DiskFileItemFactory
创建工厂类DiskFileItemFactory
The FileCleanerCleanup provides an instance of org.apache.commons.io.FileCleaningTracker. This instance must be used when creating a org.apache.commons.fileupload.disk.DiskFileItemFactory. This should be done by calling a method like the following:
public static DiskFileItemFactory newDiskFileItemFactory(ServletContext context,
File repository) {
FileCleaningTracker fileCleaningTracker
= FileCleanerCleanup.getFileCleaningTracker(context);
return new DiskFileItemFactory(fileCleaningTracker,
DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD,
repository);
}
Disabling cleanup of temporary files
禁止清理临时文件
To disable tracking of temporary files, you may set the FileCleaningTracker to null. Consequently, created files will no longer be tracked. In particular, they will no longer be deleted automatically.
为了禁止跟踪哦临时文件,你可以设置FileCleaningTracker为空对象null。然后,创建的文件将不再被跟踪。特别地,他们不再被自动删除。
一个文件上传请求由一个根据RFC1867,“HTML中基于表单的文件上传",编码的有序列表组成。FileUpload能够解析这样的一个请求并且为你的应用程序提供一个由单个的已经传上来的项目组成的列表。每一个这样的项目都实现了FileItem接口,无论其底层实现细节。
This page describes the traditional API of the commons fileupload library. The traditional API is a convenient approach. However, for ultimate performance, you might prefer the faster Streaming API .
本页描述组建库的传统API,这是便捷的方法。然而,为了极速的性能,你应当选择更快的Streaming API。
Each file item has a number of properties that might be of interest for your application. For example, every item has a name and a content type, and can provide an InputStream to access its data. On the other hand, you may need to process items differently, depending upon whether the item is a regular form field - that is, the data came from an ordinary text box or similar HTML field - or an uploaded file. The FileItem interface provides the methods to make such a determination, and to access the data in the most appropriate manner.
每一个文件项都有许多你的应用也许会感兴趣的属性。例如,每一个项目都有一个名字和内容类型,并且能够提供一个InputStream对象来访问其数据。另一方面,你也可以用不同的方式处理项目,取决于该项目是否为一个普通的表单域-即,数据是来自普通的文本框或者类似的HTML域,还是一个传上来的文件。FileItem接口提供作出此类判断和以最合适的方式访问其数据的方法。
FileUpload creates new file items using a FileItemFactory. This is what gives FileUpload most of its flexibility. The factory has ultimate control over how each item is created. The factory implementation that currently ships with FileUpload stores the item's data in memory or on disk, depending on the size of the item (i.e. bytes of data). However, this behavior can be customized to suit your application.
FileUpload使用FileItemFactory来创建新的文件项目。这是FileUpload所具有的灵活性的关键。该工厂类具有如何创建每个项的最终控制权。与FileUpload组建一同发布的该工厂类的实现根据该项目的大小(即数据的字节数)将具体项目的数据存储于内存或硬盘。然而,本行为也可被定制化以适合你的应用。
Parsing the request(解析请求)
Before you can work with the uploaded items, of course, you need to parse the request itself. Ensuring that the request is actually a file upload request is straightforward, but FileUpload makes it simplicity itself, by providing a static method to do just that.
在你能够使用上传来的项目之前,你理所应当地需要解析该请求本身。保证此请求确实是一个文件上传请求是直白的,但是FileUpload通过提供一个静态方法来完成它使其变得简单。
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
Now we are ready to parse the request into its constituent items.
现在我们准备将该请求解析成构成项目。
The simplest usage scenario is the following:
最简单的使用场景如下:
* Uploaded items should be retained in memory as long as they are reasonably small.
只要他们足够小,上传的项目将被存在内存。
* Larger items should be written to a temporary file on disk.
更大的项目应当被写到硬盘中的临时文件。
* Very large upload requests should not be permitted.
非常大的上传请求不应当被允许。
* The built-in defaults for the maximum size of an item to be retained in memory, the maximum permitted size of an upload request, and the location of temporary files are acceptable.
关于一个项目的最大内存存储大小,最大允许上传请求大小和临时文件的存储路径的缺省值是可接受的。
Handling a request in this scenario couldn't be much simpler:
处理一个此类应用场景的请求不可能比如下代码更简单的了:
// Create a factory for disk-based file items
FileItemFactory factory = new DiskFileItemFactory();
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
List /* FileItem */ items = upload.parseRequest(request);
That's all that's needed. Really!
这就是所需要的全部,真的!
The result of the parse is a List of file items, each of which implements the FileItem interface. Processing these items is discussed below.
解析的结果是一个文件项目的列表,每一个项目都实现了FileItem接口。下面将要处理这些项目。
Exercising more control(行使更多控制)
If your usage scenario is close to the simplest case, described above, but you need a little more control, you can easily customize the behavior of the upload handler or the file item factory or both. The following example shows several configuration options:
若你的使用场景类似于上述最简单的事例,但是你需要更多一点的控制,你可以定制上传处理器或文件项目工厂的行为甚或定制两者。以下代码示例展示了几种配置选项:
// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory();
// Set factory constraints
factory.setSizeThreshold(yourMaxMemorySize);
factory.setRepository(yourTempDirectory);
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Set overall request size constraint
upload.setSizeMax(yourMaxRequestSize);
// Parse the request
List /* FileItem */ items = upload.parseRequest(request);
Of course, each of the configuration methods is independent of the others, but if you want to configure the factory all at once, you can do that with an alternative constructor, like this:
当然,每一个配置方法都独立于其它方法,但是,若你需要一次对项目工厂进行配置,你可以使用一个替代性的构建方法:
// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory(
yourMaxMemorySize, yourTempDirectory);
Should you need further control over the parsing of the request, such as storing the items elsewhere - for example, in a database - you will need to look into customizing FileUpload.
如果你需要对请求的解析进行进一步的控制,比如将项目存储于其它地方-例如,存到数据库中,你需要查阅定制化FileUpload.
Processing the uploaded items
处理上传项目
Once the parse has completed, you will have a List of file items that you need to process. In most cases, you will want to handle file uploads differently from regular form fields, so you might process the list like this:
一旦解析完成,你将得到一个待处理的文件项目的列表。在多数情况下,你将需要同普通表单域不一样的处理,所以你应像这样来处理这个列表:
// Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
processFormField(item);
} else {
processUploadedFile(item);
}
}
For a regular form field, you will most likely be interested only in the name of the item, and its String value. As you might expect, accessing these is very simple.
对于一个常规的表单域,你最可能对该项的名字感兴趣和它的字符串值。如你所料,访问这些是非常简单的。
// Process a regular form field
if (item.isFormField()) {
String name = item.getFieldName();
String value = item.getString();
...
}
For a file upload, there are several different things you might want to know before you process the content. Here is an example of some of the methods you might be interested in.
对于一个文件上传,在你处理内容之前,有几个不同的东西需要知道。下列示例方法你也许会感兴趣。
// Process a file upload
if (!item.isFormField()) {
String fieldName = item.getFieldName();
String fileName = item.getName();
String contentType = item.getContentType();
boolean isInMemory = item.isInMemory();
long sizeInBytes = item.getSize();
...
}
With uploaded files, you generally will not want to access them via memory, unless they are small, or unless you have no other alternative. Rather, you will want to process the content as a stream, or write the entire file to its ultimate location. FileUpload provides simple means of accomplishing both of these.
对于上传的文件,你一般不会想通过内存来存取他们,除非他们非常小,或者你别无选择。你将需要将内容作为一个来处理,或者将整个文件写道它的最终位置。FileUpload提供了完成此两种情况的简单方法。
// Process a file upload
if (writeToFile) {
File uploadedFile = new File(...);
item.write(uploadedFile);
} else {
InputStream uploadedStream = item.getInputStream();
...
uploadedStream.close();
}
Note that, in the default implementation of FileUpload, write() will attempt to rename the file to the specified destination, if the data is already in a temporary file. Actually copying the data is only done if the the rename fails, for some reason, or if the data was in memory.
注意,在FileUpload的缺省实现里,write()将尝试重新命名文件到指定的位置,若数据已经在临时文件中。实际上,由于某种原因或者数据在内存中,只有在重新命名失败时才拷贝数据。
If you do need to access the uploaded data in memory, you need simply call the get() method to obtain the data as an array of bytes.
如果你需要访问上传于内存的数据,你只需要调用get()方法来获得字节数组类型的数据。
// Process a file upload in memory
byte[] data = item.get();
...
Resource cleanup
资源清理
This section applies only, if you are using the DiskFileItem . In other words, it applies, if your uploaded files are written to temporary files before processing them.
本部分只适用于使用DiskFileItem的时候。也就是说,它只适用于在处理之前,将上传文件写到临时文件中。
Such temporary files are deleted automatically, if they are no longer used (more precisely, if the corresponding instance of java.io.File is garbage collected. This is done silently by the org.apache.commons.io.FileCleaner class, which starts a reaper thread.
若不再被使用(更确切些,若相应的java.io.File实例被垃圾回收了),这些临时文件被自动删除。这由org.apache.commons.io.FileCleaner类,该类开启一个回收线程,悄悄地执行。
This reaper thread should be stopped, if it is no longer needed. In a servlet environment, this is done by using a special servlet context listener, called FileCleanerCleanup . To do so, add a section like the following to your web.xml:
这个回收线程将被关闭,如果不再需要。在一个servlet容器环境中,这些由一个特殊的被称为FileCleanerCleanup的servlet context listener监听器实现。为此,向你的web.xml文件加入如下配置段:
<web-app>
...
<listener>
<listener-class>
org.apache.commons.fileupload.servlet.FileCleanerCleanup
</listener-class>
</listener>
...
</web-app>
Creating a DiskFileItemFactory
创建工厂类DiskFileItemFactory
The FileCleanerCleanup provides an instance of org.apache.commons.io.FileCleaningTracker. This instance must be used when creating a org.apache.commons.fileupload.disk.DiskFileItemFactory. This should be done by calling a method like the following:
public static DiskFileItemFactory newDiskFileItemFactory(ServletContext context,
File repository) {
FileCleaningTracker fileCleaningTracker
= FileCleanerCleanup.getFileCleaningTracker(context);
return new DiskFileItemFactory(fileCleaningTracker,
DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD,
repository);
}
Disabling cleanup of temporary files
禁止清理临时文件
To disable tracking of temporary files, you may set the FileCleaningTracker to null. Consequently, created files will no longer be tracked. In particular, they will no longer be deleted automatically.
为了禁止跟踪哦临时文件,你可以设置FileCleaningTracker为空对象null。然后,创建的文件将不再被跟踪。特别地,他们不再被自动删除。
发表评论
-
关于团购的知识
2011-02-27 22:10 721第一,他们在中国市场 ... -
javascript的开发工具还是Aptana好
2011-01-12 20:14 784消耗内存多些,其实在我的4GB内存中,只占4%,无所谓 ... -
人生杂感
2010-07-23 16:33 856对于不能或不愿在体制内谋生的人而言,何方是归路?这个时代是有希 ... -
JDK上的动态语言
2010-06-18 09:51 755Rails框架在Web开发世界的大行其道,强烈地刺激了Java ... -
几个长期困惑我的问题
2010-06-04 09:33 8311.计算机的二进制基础,使用什么语言编写程序,对机器而言是不重 ... -
电子政务的价值
2009-08-21 10:54 1100本人从事电子政务工作十多年,觉得用信息技术来改造政府的治理方式 ... -
Hibernate
2009-03-03 08:45 673HQL输出对象属性的嵌套查询实例: select t.name ... -
ubuntu's jdk
2008-10-08 10:10 490尽量使用系统缺省的JAVA:/usr/bin/java -&g ... -
MRTG--网络健康的心电监护仪
2008-06-23 10:38 914MRTG大致是多路由器流量绘图器的意思,顾名思义,是用来对网络 ...
相关推荐
总的来说,这个ASP文件上传组件提供了一种在ASP环境中实现文件上传的方法,尽管存在一定的局限性,但对于那些仍在维护使用ASP的老系统,或者需要与旧系统兼容的项目来说,仍有一定的价值。对于开发者而言,了解这种...
ASP文件上传组件是一种在Web应用中用于处理用户上传文件的技术,尤其适用于ASP(Active Server Pages)环境。在ASP中,由于其内置的功能有限,通常需要借助第三方组件来实现文件上传功能。"asp文件上传组件 asp无组...
在这个场景中,"js 多文件上传组件"是指一种能够允许用户一次性选择并上传多个文件的前端解决方案。 多文件上传组件的实现主要包括以下几个关键点: 1. **HTML5 File API**:HTML5引入了File API,使得JavaScript...
在“多文件上传组件_Flash+ASP实现多文件上传功能”这个免费资源中,可能包含了实现这一功能的完整代码和详细说明。通常,这样的组件会包含Flash前端的ActionScript代码、ASP服务器端的处理程序代码,以及可能的配置...
Bootstrap文件上传组件FileInput是一款强大的前端文件上传工具,尤其适合于需要实现文件批量上传的场景。这个组件基于Bootstrap框架,提供了美观的用户界面和丰富的功能,使得文件上传操作变得直观且易于实现。以下...
ntsky文件上传组件是一款在IT领域中用于网页或应用程序实现文件上传功能的专业工具。它能够帮助开发者轻松地集成文件上传功能,使得用户可以方便快捷地将本地文件上传到服务器。这款组件通常支持多种文件类型,并且...
根据提供的压缩包文件名称列表,我们可以看到有一个“多文件上传组件简易使用说明.doc”,这应该是对组件如何使用的详细介绍,包括如何在Eclipse工程中导入、配置以及如何在前端和后端调用相应的API。而“load”可能...
在压缩包内,"www.pudn.com.txt" 可能是一个包含组件使用说明或者相关链接的文档,而"ntsky 文件上传组件"则很可能是实际的组件源代码或编译后的库文件,供开发者集成到自己的项目中。 使用ntsky 文件上传组件时,...
由于JSF2.0标准实现没有提供文件上传组件,而实际应用中很多时候需要上传文件,为了方便开发,我做了一个基于JSF2.0的文件上传组件,上传使用的是Apache 的commons-fileupload组件,我已经将commons-fileupload-...
综上所述,Asp.net2.0大文件上传组件利用了分块或流式上传技术处理大文件,通过AJAX和UpdateProgress控件提供进度条显示,支持单文件和多文件上传,并提供了详细的使用说明和示例代码,是提升用户体验和增强应用功能...
本篇文章将详细讲解如何在JSP中实现文件上传,并介绍必要的组件及其工作原理。 首先,我们需要了解的是"jsp上传文件的组件"。在这个场景中,`jspsmart.jar`是一个关键的组件,它是一个专门用于处理文件上传的库。...
Uploadify 是一个基于jQuery的多文件上传插件,版本2.1.4是其历史版本之一,用于在网页上实现批量、异步的文件上传功能。这个组件以其易用性和强大的自定义性受到开发者的欢迎。本文将详细介绍Uploadify 2.1.4的使用...
Uploader是非常强大的异步文件上传组件,支持ajax、iframe、flash三套方案,实现浏览器的全兼容,调用非常简单,内置多套主题支持 和常用插件,比如验证、图片预览、进度条等,广泛应用于淘宝网,比如退款系统、...
修改的基础依赖于潇湘jsp多文件上传组件2.1。 由于最近几天正好用到上传组件,所以在网上找到了潇湘jsp多文件上传组件2.1版本,经测试,发现如下问题:页面编码为UTF-8时,getParameter()的值乱码;另外没有...
【艾恩ASP文件上传组件】是一款专为ASP(Active Server Pages)开发的文件上传解决方案,它简化了在ASP环境中处理文件上传的过程,提供了多种上传方式,包括iframe框架上传、混合上传和弹窗上传,同时也支持使用Ajax...
文件上传组件需要考虑安全问题,例如防止文件注入攻击(如上传恶意脚本)。通常会进行文件类型检查、大小限制、重命名上传文件以避免路径遍历攻击,以及可能的病毒扫描。 **5. 控件与源码** 标签中的“不可视构件”...
【标题】:“Flash文件上传组件”是一种用于网页中的文件上传工具,它利用Adobe Flash技术实现,为用户提供了一种直观、用户友好的界面来选择和上传文件。这种组件通常被用在那些需要用户提交大量或者大文件大小的...
总结来说,"SWF多文件上传组件"是一个用SWF开发的、具备良好用户界面的文件上传工具,它可能包含ASP.NET的集成支持、可定制的CSS样式、详细的使用说明以及强大的缩略图预览功能。这样的组件对于需要处理大量用户上传...
接下来,文件上传组件的工作原理:当用户在网页上选择文件并提交表单时,ASP文件lyf上传组件会处理这些请求。它将文件内容封装到HTTP POST请求中,然后发送到服务器。服务器接收到请求后,组件解析POST数据,将文件...
总结来说,WebUploader是一个强大的前端文件上传组件,通过其丰富的功能和易于使用的API,可以帮助开发者轻松实现高效、稳定的文件上传功能。结合`bakauploader-master`中的资源和示例,可以进一步优化和扩展...