优化功能,页面上传图片时做限制
This commit is contained in:
@@ -280,6 +280,9 @@
|
|||||||
var uploadInst1 = upload.render({
|
var uploadInst1 = upload.render({
|
||||||
elem: '#upload1',
|
elem: '#upload1',
|
||||||
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
||||||
|
accept: "images",
|
||||||
|
acceptMime: "image/jpeg,image/gif,image/png,imag/bmp",
|
||||||
|
//exts: "jpg|png|gif|bmp|jpeg", //accept为file时需要设置
|
||||||
before: function (obj) {
|
before: function (obj) {
|
||||||
// 预读本地文件示例,不支持ie8
|
// 预读本地文件示例,不支持ie8
|
||||||
//obj.preview(function (index, file, result) {
|
//obj.preview(function (index, file, result) {
|
||||||
@@ -318,6 +321,9 @@
|
|||||||
var uploadInst2 = upload.render({
|
var uploadInst2 = upload.render({
|
||||||
elem: '#upload2',
|
elem: '#upload2',
|
||||||
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
||||||
|
accept: "images",
|
||||||
|
acceptMime: "image/jpeg,image/gif,image/png,imag/bmp",
|
||||||
|
//exts: "jpg|png|gif|bmp|jpeg", //accept为file时需要设置
|
||||||
before: function (obj) {
|
before: function (obj) {
|
||||||
// 预读本地文件示例,不支持ie8
|
// 预读本地文件示例,不支持ie8
|
||||||
//obj.preview(function (index, file, result) {
|
//obj.preview(function (index, file, result) {
|
||||||
@@ -357,6 +363,9 @@
|
|||||||
var uploadInst3 = upload.render({
|
var uploadInst3 = upload.render({
|
||||||
elem: '#upload3',
|
elem: '#upload3',
|
||||||
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
||||||
|
accept: "images",
|
||||||
|
acceptMime: "image/jpeg,image/gif,image/png,imag/bmp",
|
||||||
|
//exts: "jpg|png|gif|bmp|jpeg", //accept为file时需要设置
|
||||||
before: function (obj) {
|
before: function (obj) {
|
||||||
// 预读本地文件示例,不支持ie8
|
// 预读本地文件示例,不支持ie8
|
||||||
//obj.preview(function (index, file, result) {
|
//obj.preview(function (index, file, result) {
|
||||||
@@ -396,6 +405,9 @@
|
|||||||
var uploadInst4 = upload.render({
|
var uploadInst4 = upload.render({
|
||||||
elem: '#upload4',
|
elem: '#upload4',
|
||||||
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
url: '/uploadImage', // 实际使用时改成您自己的上传接口即可。
|
||||||
|
accept: "images",
|
||||||
|
acceptMime: "image/jpeg,image/gif,image/png,imag/bmp",
|
||||||
|
//exts: "jpg|png|gif|bmp|jpeg", //accept为file时需要设置
|
||||||
before: function (obj) {
|
before: function (obj) {
|
||||||
// 预读本地文件示例,不支持ie8
|
// 预读本地文件示例,不支持ie8
|
||||||
//obj.preview(function (index, file, result) {
|
//obj.preview(function (index, file, result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user