commit
This commit is contained in:
@@ -1,88 +0,0 @@
|
||||
var ioc={
|
||||
tmpFilePool: {
|
||||
type: 'org.nutz.filepool.NutFilePool',
|
||||
// 临时文件最大个数为 1000 个
|
||||
args: [
|
||||
"~/budcms/upload/tmp",
|
||||
1000
|
||||
]
|
||||
},
|
||||
uploadImageContext: {
|
||||
type: 'org.nutz.mvc.upload.UploadingContext',
|
||||
singleton: false,
|
||||
args: [
|
||||
{
|
||||
refer: 'tmpFilePool'
|
||||
}
|
||||
],
|
||||
fields: {
|
||||
// 是否忽略空文件, 默认为 false
|
||||
ignoreNull: true,
|
||||
// 单个文件最大尺寸(大约的值,单位为字节,即 2097152 为 2M)
|
||||
maxFileSize: 2097152,
|
||||
// 正则表达式匹配可以支持的文件名
|
||||
nameFilter: '^(.+[.])(svg|gif|jpg|png|jpeg|JPEG)$'
|
||||
}
|
||||
},
|
||||
imageUpload: {
|
||||
type: 'org.nutz.mvc.upload.UploadAdaptor',
|
||||
singleton: false,
|
||||
args: [
|
||||
{
|
||||
refer: 'uploadImageContext'
|
||||
}
|
||||
]
|
||||
},
|
||||
uploadFileContext: {
|
||||
type: 'org.nutz.mvc.upload.UploadingContext',
|
||||
singleton: false,
|
||||
args: [
|
||||
{
|
||||
refer: 'tmpFilePool'
|
||||
}
|
||||
],
|
||||
fields: {
|
||||
// 是否忽略空文件, 默认为 false
|
||||
ignoreNull: true,
|
||||
// 单个文件最大尺寸(大约的值,单位为字节,即 209715200 为 200M)
|
||||
maxFileSize: 209715200,
|
||||
// 正则表达式匹配可以支持的文件名
|
||||
nameFilter: '^(.+[.])(svg|webp|gif|jpg|png|jpeg|JPEG|doc|docx|xls|xlsx|rar|zip|7z|flv|swf|mkv|avi|txt|xml|pdf|md|pptx|ppt|flv|swf|mkv|avi|rm|rmvb|wmv|mp4|mp3|mov|mpg|mpeg|class|jar)$'
|
||||
}
|
||||
},
|
||||
fileUpload: {
|
||||
type: 'org.nutz.mvc.upload.UploadAdaptor',
|
||||
singleton: false,
|
||||
args: [
|
||||
{
|
||||
refer: 'uploadFileContext'
|
||||
}
|
||||
]
|
||||
},
|
||||
uploadVideoContext: {
|
||||
type: 'org.nutz.mvc.upload.UploadingContext',
|
||||
singleton: false,
|
||||
args: [
|
||||
{
|
||||
refer: 'tmpFilePool'
|
||||
}
|
||||
],
|
||||
fields: {
|
||||
// 是否忽略空文件, 默认为 false
|
||||
ignoreNull: true,
|
||||
// 单个文件最大尺寸(大约的值,单位为字节,即 209715200 为 200M)
|
||||
maxFileSize: 209715200,
|
||||
// 正则表达式匹配可以支持的文件名
|
||||
nameFilter: '^(.+[.])(flv|swf|mkv|avi|rm|rmvb|wmv|mp4|mov|mpg|mpeg)$'
|
||||
}
|
||||
},
|
||||
videoUpload: {
|
||||
type: 'org.nutz.mvc.upload.UploadAdaptor',
|
||||
singleton: false,
|
||||
args: [
|
||||
{
|
||||
refer: 'uploadVideoContext'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user