更新时间:2023-02-24 13:37:09
( document ) .ready( function (){
(document).ready(function () {
( #uploader)。pluploadQueue({
// 常规设置
运行时:' html5,html4,gears,flash,silverlight',
url:' @ Url.Action(UploadImage)',
max_file_size:' 10mb',
chunk_size:' 1mb',
unique_names: true ,
button_browse_hover: true ,
multiple_queues: true ,
dragdrop: false ,
// 如果我们可以 $ b,请在客户端调整图片大小$ b调整大小:{width: 320 ,身高: 340 ,质量: 90 },
// 指定要浏览的文件
过滤器:[
{title: 图像文件 ,扩展名: jpg,gif,png,jpeg,bmp},
{title : Zip文件,扩展名: zip },
{title:' PDF文件',扩展名:' pdf'},
{title: Excel文件,扩展名: xls ,xslx,csv},
],
// Silverlight设置
silverlight_xap_url:' @ Url.Content(〜/ Scripts / plupload / plupload.silverlight.xap)'
});
// 客户端表单验证
("#uploader").pluploadQueue({ // General settings runtimes: 'html5,html4,gears,flash,silverlight', url: '@Url.Action("UploadImage")', max_file_size: '10mb', chunk_size: '1mb', unique_names: true, button_browse_hover: true, multiple_queues: true, dragdrop: false, // Resize images on clientside if we can resize: { width: 320, height: 340, quality: 90 }, // Specify what files to browse for filters: [ { title: "Image files", extensions: "jpg,gif,png,jpeg,bmp" }, { title: "Zip files", extensions: "zip" }, { title: 'PDF files', extensions: 'pdf' }, { title: "Excel Files", extensions: "xls,xslx,csv" }, ], // Silverlight settings silverlight_xap_url: '@Url.Content("~/Scripts/plupload/plupload.silverlight.xap")' }); // Client side form validation
(' form')。submit( function (e){
var uploader =
('form').submit(function (e) { var uploader =