更新上传

This commit is contained in:
mkm 2023-11-23 09:56:06 +08:00
parent e1f105d98a
commit aca40a4b0e
3 changed files with 4 additions and 3 deletions

View File

@ -161,8 +161,8 @@ class Common extends BaseController
$file = is_array($file) ? $file[0] : $file;
validate(["$field|图片" => [
'fileSize' => config('upload.filesize'),
'fileExt' => 'jpg,jpeg,png,bmp,gif',
'fileMime' => 'image/jpeg,image/png,image/gif,application/octet-stream'
'fileExt' => config('upload.fileExt'),
// 'fileMime' => 'image/jpeg,image/png,image/gif,application/octet-stream,application/vnd.android.package-archive'
]])->check([$field => $file]);
$upload = UploadService::create();
$info = $upload->to('def')->move($field);

View File

@ -69,6 +69,7 @@ class StoreMicro extends BaseController
//提交导入商品id
public function ProductImport(){
return app('json')->fail('该接口已废弃');
$id = $this->request->param('id', 0);
$price = $this->request->param('price', 0);
$stock = $this->request->param('stock', 0);

View File

@ -19,7 +19,7 @@ return [
//上传文件大小
'filesize' => 52428800,
//上传文件后缀类型
'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'ico', 'apk', 'ipa'],
'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'ico', 'apk', 'ipa','wgt'],
//上传文件类型
'fileMime' => ['image/jpeg', 'image/gif', 'image/png', 'text/plain', 'audio/mpeg', 'image/vnd.microsoft.icon'],
//驱动模式