allFiles(); foreach ($all_file['wangEditorH5File'] as $key => $value) { if ($value->isValid()) { $result = '/storage/'.Storage::disk("public")->putFile("editor", $value); $save[]=config('app.url').$result; } } echo json_encode(array('errno'=>0,'data'=>$save)); } public function imUploadPic(Request $request) { $dst = 'im'; $file = $request->file('file'); $picInfo = getimagesize($file); if (! $picInfo) { return self::returnCode('sys.notImageFile'); } $srcPath = $file->getPathname(); $extension = $file->getClientOriginalExtension(); // $fileName = time() . rand(). '.' . $extension; $dstPath = $dst . '/' . date('Ym') ; $path = $request->file('file')->store($dstPath); return ['code'=>1000, 'data'=>['pic'=>$path]]; } }