Tinywan / webman-storage

the simple more file upload library for webman plugin
https://www.workerman.net/plugin/21
MIT License
25 stars 6 forks source link

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

Open xpwsgg opened 1 year ago

xpwsgg commented 1 year ago

<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();这样使用就报验证错误,截图找不到了。。。

Tinywan commented 1 year ago

@xpwsgg 错误问题能否详细点