Navigation Menu

Skip to content

Commit

Permalink
文件上传白名单配置为所有
Browse files Browse the repository at this point in the history
  • Loading branch information
apgzs committed Jul 14, 2021
1 parent 2c8a30a commit a9d8452
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions src/config/config.default.ts
Expand Up @@ -74,40 +74,7 @@ export default (appInfo: EggAppInfo) => {
config.multipart = {
fileSize: '100mb',
mode: 'file',
whitelist: [
// images
'.jpg',
'.jpeg', // image/jpeg
'.png', // image/png, image/x-png
'.gif', // image/gif
'.bmp', // image/bmp
'.wbmp', // image/vnd.wap.wbmp
'.webp',
'.tif',
'.psd',
// text
'.svg',
'.js',
'.jsx',
'.json',
'.css',
'.less',
'.html',
'.htm',
'.xml',
// tar
'.zip',
'.gz',
'.tgz',
'.gzip',
// video
'.mp3',
'.mp4',
'.avi',
// 证书
'.p12',
'.pem',
],
whitelist: () => true,
};

// 将egg日志替换成midway
Expand Down

0 comments on commit a9d8452

Please sign in to comment.