Home  >  Article  >  Web Front-end  >  Simple implementation of ajax file upload application_jquery

Simple implementation of ajax file upload application_jquery

WBOY
WBOYOriginal
2016-05-16 18:55:26841browse

This plug-in supports multiple file selection functions, which is very good, and the code is simple

Copy the code The code is as follows:

$("#fileUpload").fileUpload({
'uploader': 'style/uploader.swf',
'cancelImg': 'style/img/cancel.png',

'folder': '/mbs/fileUpload',
'script': '/mbs/FileUpload',
'buttonText': 'Durchsuchen',
'fileDesc': '*.jpg; *.gif;*.png',
'fileExt': '*.jpg;*.gif;*.png',
'scriptData': {'uploadAction': 'upload'},
'multi': true

});

'multi': true : This is the multi-file selection function.
'script': '/mbs/FileUpload': Background processing of uploaded files
'scriptData': {'uploadAction': 'upload'}: Variables that need to be included in post data
Detailed attribute descriptions can be viewed Official document
http://www.ronniesan.com/articles/jquery-multiple-file-upload.php
Here are some screenshots of how I implemented the application

多文件选择

准备上传

文件上传中

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn