webman-storage
webman-storage copied to clipboard
前端以images[]格式上传的话直接报错
trafficstars
<input type="file" name="images[]"/>多图上传的组件经常用到这样的方式。
这样得foreach两次才能拿到上传对象,大概是这个样子:
foreach (request()->file() as $spl_file) {
foreach ($spl_file as $_file) {
$upload = Upload::instance();
$res = $upload->uploadOne($_file);
$path[] = $res['url'];
}
}
用组件的方法$res = Tinywan\Storage\Storage::uploadFile();这样使用就报验证错误,截图找不到了。。。
@xpwsgg 错误问题能否详细点