1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| // 这里用作公开课添加上传图片
var uploader = Qiniu.uploader({
runtimes: 'html5,flash,html4',
filters: {mime_types: [
{title : "Image files", extensions : "jpg,gif,png"}
]},
browse_button: 'pickfiles',
container: 'container',
drop_element: 'container',
max_file_size: '2mb',
flash_swf_url: 'qiniu/plupload/Moxie.swf',
dragdrop: true,
chunk_size: '2mb',
multi_selection: false,
uptoken:data,
domain: qiniu_domain,
get_new_uptoken: false,
auto_start: true,
log_level: 0,
**unique_names: true,**
init: {
'FilesAdded': function(up, files) { ... |