webman-storage icon indicating copy to clipboard operation
webman-storage copied to clipboard

前端以images[]格式上传的话直接报错

Open xpwsgg opened this issue 2 years ago • 1 comments
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 avatar Mar 31 '23 07:03 xpwsgg

@xpwsgg 错误问题能否详细点

Tinywan avatar Mar 31 '23 11:03 Tinywan