[donation_link]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=3PMY37SL9L888&lc=US&item_name=JavaScript%20file%20uploader¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
This plugin uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+,
Chrome and falls back to hidden iframe based upload in other browsers,
providing good user experience everywhere.
### <a href="http://valums.com/files/2010/file-uploader/demo.htm">Demo</a> [Donate][donation_link] ###
### Features ###
* multiple file select, progress-bar in FF, Chrome, Safari
* drag-and-drop file select in FF, Chrome
* uploads are cancellable
* no external dependencies
* doesn't use Flash
* fully working with https
* keyboard support in FF, Chrome, Safari
* tested in IE7,8; Firefox 3,3.6,4; Safari4,5; Chrome; Opera10.60;
### License ###
This plugin is open sourced under <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPL 2</a> or later.
If this license doesn't suit you mail me at andrew (at) valums.com.
Please [donate][donation_link] if you are willing to support the further development of file upload plugin.
### Known Issues ###
Plugin breaks back button functionality in Opera.
### Getting started ###
The fileuploader.js contains two classes that are meant to be used directly.
If you need a complete upload widget (from demo) to quickly drop
into your current design, use qq.FileUploader.
If you want to customize uploader, by using a different looking file list
or change the behaviour or functionality use qq.FileUploaderBasic.
The difference between them is that qq.FileUploader provides a list of files,
drag-and-drop, but qq.FileUploaderBasic only creates button and handles validation.
Basic uploader is easier extendable, and doesn't limit possible customization.
qq.FileUploader extends qq.FileUploaderBasic, so that all the options present
in the basic uploader also exist in the full widget.
### qq.FileUploader - Setting up full upload widget ###
Include fileuploader.js and fileuploader.css into your page.
Create container element.
<div id="file-uploader">
<noscript>
<p>Please enable JavaScript to use file uploader.</p>
<!-- or put a simple form for upload here -->
</noscript>
</div>
Initialize uploader when the DOM is ready. Change the action option.
For example ../server/php.php for the default folder structure.
In the server folder you will find examples for different platforms.
If you can't find the one you need, check the readme.txt in the same folder.
var uploader = new qq.FileUploader({
// pass the dom node (ex. $(selector)[0] for jQuery users)
element: document.getElementById('file-uploader'),
// path to server-side upload script
action: '/server/upload'
});
### Options of both classes ###
// url of the server-side upload script, should be on the same domain
action: '/server/upload',
// additional data to send, name-value pairs
params: {},
// validation
// ex. ['jpg', 'jpeg', 'png', 'gif'] or []
allowedExtensions: [],
// each file size limit in bytes
// this option isn't supported in all browsers
sizeLimit: 0, // max size
minSizeLimit: 0, // min size
// set to true to output server response to console
debug: false,
// events
// you can return false to abort submit
onSubmit: function(id, fileName){},
onProgress: function(id, fileName, loaded, total){},
onComplete: function(id, fileName, responseJSON){},
onCancel: function(id, fileName){},
messages: {
// error messages, see qq.FileUploaderBasic for content
},
showMessage: function(message){ alert(message); }
Instance methods
* setParams(newParams)
#### Changing alert/messages to something more user friendly ####
If you limited file types and max size, you will probably want to change the default alert and
messages as you see fit, this is possible using showMessage callback and messages option.
#### Sending additional params ####
To add a parameter that will be passed as a query string with each upload use params option.
var uploader = new qq.FileUploader({
element: document.getElementById('file-uploader'),
action: '/server-side.upload',
// additional data to send, name-value pairs
params: {
param1: 'value1',
param2: 'value2'
}
});
To change params based on the state of your app, use
uploader.setParams({
anotherParam: 'value'
});
It can be nicely used in onSubmit callback.
#### Troubleshooting ####
If you can't get the uploader to work, please try the following steps
before asking for help.
If the upload doesn't complete, saying failed.
* Set the debug option of the FileUploader to true.
* Open the page where you have a FileUploader.
* Open developer console in your browser.
* Try to upload the file. You should see a server serponse.
It should be {success:true} for completed requests. If it's not,
then you have a problem with your server-side script.
#### Contributors ####
Thanks to everybody who contributed, either by sending bug reports or donating. And special thanks to:
John Yeary
Sidney Maestre
Patrick Pfeiffer
Sean Sandy (SeanJA)
Andy Newby
Ivan Valles
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的Friendika开源社区软件源码.zip
共1267个文件
php:398个
tpl:170个
js:162个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 16 浏览量
2023-08-26
21:49:56
上传
评论
收藏 4.27MB ZIP 举报
温馨提示
基于PHP的Friendika开源社区软件源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的Friendika开源社区软件源码.zip (1267个子文件)
sIFR.as 14KB
SifrStyleSheet.as 2KB
options.as 504B
sample.avi 81KB
coldfusion.cfc 2KB
demo.cfm 1KB
perl.cgi 2KB
style.css 36KB
style.css 36KB
jquery-ui-1.8.4.custom.css 22KB
style.css 19KB
ui.css 15KB
ui.css 15KB
window.css 6KB
simplepie.css 6KB
dialog.css 6KB
dialog.css 5KB
cropper.css 4KB
fullpage.css 3KB
qunit.css 3KB
ui.css 2KB
ui.css 2KB
style.css 2KB
ui_black.css 2KB
content.css 2KB
style.css 2KB
content.css 2KB
style.css 1KB
content.css 1KB
custom_tinymce.css 1KB
style.css 1KB
media.css 1KB
fileuploader.css 1KB
statusnet.css 1016B
style.css 961B
style.css 959B
word.css 942B
sIFR-print.css 873B
props.css 859B
style.css 843B
ui_silver.css 819B
sIFR-screen.css 762B
advimage.css 672B
style.css 653B
style.css 574B
docbook.css 566B
content.css 530B
popup.css 514B
content.css 513B
twitter.css 485B
advlink.css 480B
content.css 461B
row.css 306B
ConfigForm.css 301B
template.css 275B
advhr.css 240B
cell.css 205B
attributes.css 197B
facebook.css 177B
searchreplace.css 176B
table.css 170B
content.css 169B
piwik.css 125B
randplace.css 123B
fortunate.css 111B
content.css 98B
lock.cur 4KB
lock.cur 4KB
sample.dcr 7KB
developer 809B
sifr.fla 46KB
icons.gif 12KB
progress.gif 2KB
1imagelonglonglonglonglonglongname.gif 2KB
loading.gif 2KB
sample.gif 2KB
people.gif 1KB
icons.gif 1KB
top_gradient.gif 1KB
document.gif 1KB
tabs.gif 1KB
buttons.gif 1KB
marqueeVert.gif 1KB
marqueeHoriz.gif 1KB
article.gif 1KB
mapicon.gif 1KB
globe.gif 1KB
camera-icon.gif 1015B
larrw.gif 1004B
rarrw.gif 999B
unlock_icon.gif 938B
lock_icon.gif 932B
youtube_icon.gif 924B
confirm.gif 915B
play.gif 912B
corners.gif 911B
pause.gif 866B
rotator.gif 826B
alert.gif 818B
horizontal.gif 769B
共 1267 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
资源评论
易小侠
- 粉丝: 6507
- 资源: 9万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功