现在的位置: 首页 > 综合 > 正文

Uploadify使用说明

2013年04月17日 ⁄ 综合 ⁄ 共 3555字 ⁄ 字号 评论关闭

Uploadify使用说明

什么是Uploadify

原文:Uploadify is a jQuery
plugin that integrates a fully-customizable multiple file upload utility on
your website. It uses a mixture of Javascript, ActionScript, and any
server-side language to dynamically create an instance over any DOM element on
a page.

 

译文:Uploadify是一个jQuery插件,集成了一个完全可定制的多个文件上传您的网站上的效用。它混合使用的JavascriptActionScript,和任何服务器端语言来动态创建的任何一个页面上的DOM元素的一个实例。

 

原文: Uploadify
was born out of the need for a multiple file upload utility for a CMS that was
being developed.  After evaluating the other available options, RonnieSan
decided the best option was to build a new plug-in and make it available to the
development community.  In order to make the plug-in easy to implement and
highly-customizable, the jQuery format was chosen.  After word got out,
the popularity of the plug-in spawned the need for a dedicated site. 
Travis Nickels volunteered his help to refine the Uploadify plug-in and make it
what it is today.

 

译文:CMS开发后,需要实现多文件上传功能,这样,Uploadify这个实用工具诞生了。经过评过其他可用选项,RonnieSan决定创建一个新的插件提供给开发社区。为了使这个插件容易实施,并可高度定制,最后选择了Jquery.消息传出后,这个插件的普及,使其需要一个专门的网站来提供支持。Travis Nickels自告奋勇的去帮助和完善Uploadify插件。这就是我们今天看到的这个网站。

 

Uplodify的特点

Features

特点

·        
jQuery Implementation

Jquery支持

·        
Multiple File Upload Capabilities

多文件上传功能

·        
SWFObject Integration

SWFObject集成

·        
Compatibility with Popular Server-Side Languages

流行的服务器端语言功能

·        
Highly-Customizable

高定制性

·        
Large Support Community

强大的社区支持

·        
Extensive Documentation with Examples

扩展文档和实例

 

怎么使用Uploadify

原文:Uploadify was created
to be an easy-to-implement solution for multiple file uploads. As a jQuery
plugin, the Uploadify implementation is simple and highly-customizable.

While
it may require a foundational knowledge of jQuery to successfully implement,
this documentation should provide a comprehensive enough reference for those
who are having trouble.  If you are running into issues that this
documentation can't help solve, there is an active community of Uploadify users
that can be accessed through the
 forums.  In
addition, we've provided a list of
 FAQs that may also aid in troubleshooting your
Uploadify instance

 

译文:

Uploadify是一个简单易用的多文件上传方案。作为一个Jquery插件,Uploadify使用简单,并具有高度的定制性。

正常使用Uploadify插件需要一些Jquery基础知识。为了减少使用问题,本文档提供了足够全面的参考知识。如果该文档不能解决你在使用中遇到的问题,请访问论坛(http://www.uploadify.com/forums/)获取更多信息。此外,我们提供了常见问题列表,也许这些信息也能帮助你解决Uploadify在使用中遇到的问题。

 

最低需求

jQuery
1.4.x or greater

Jquery1.4及更高版本

swfObject
2.2 or greater

SwfObject2.2及以上版本

Flash
Player 9.0.24 or greater

Flash
Player 9.0.24
及以上版本

 

示例代码

头文件引入

<link href="uploadify/uploadify.css" type="text/css"
rel="Stylesheet"
rev="Stylesheet"
/>

<script type="text/javascript" language="javascript" src="uploadify/jquery-1.4.2.min.js"></script>

<script type="text/javascript" language="javascript" src="uploadify/swfobject.js"></script>

<script type="text/javascript" language="javascript" src="uploadify/jquery.uploadify.v2.1.4.min.js"></script>

使用Uploadify插件需要引入uploadify.cssjquery.jsswfobjects.js、和uploadify.js4个文件

 

HTML文件

<input type="file" id="up_file" />

如果只是实现简单的文件上传功能,只需要在body里,添加一个file

Js代码

<script type="text/javascript" language="javascript">

        $(document).ready(function () {

            $("#up_file").uploadify({

                'uploader':
'/uploadify/uploadify/uploadify.swf',

                'script':
'/uploadify/UploadifyHandler.ashx',

                'cancelImg':
'/uploadify/uploadify/cancel.png',

                'folder':
'/upload',

                'auto':true,

                'multi':true

            });

        });

    </script>

Ok,以上文件就可以实现一个文件上传功能。

                                                                  属性

名称

类型

描述

auto

boolean

文件添加到上传队列后,自动进行上传。默认为false

buttonImg

string

浏览按钮的图片路径

buttonText

string

浏览按钮上显示的文字(不支持中文,但是可以设置有中文的图片)

cancelImg

string

文件上传队列中的取消按钮图片路径

checkScript

string

检测服务器上已经存在的文件的服务器端脚本路径

displayData

string

文件上传过程中,在该文件的队列条目显示的数据信息。默认是上传的百分比(percentage),

抱歉!评论已关闭.