我正在尝试上传多个图像,但不幸的是,我收到错误“消息”:“文件“phpzP428U.png”不存在”,我该如何解决这个问题?谢谢。
退货要求
dd($request->all())
收件箱控制器
foreach ($request["file"] as $key => $value) {
$file = Storage::disk('yourstitchart')->putFile('', $value);
array_push($files, $file);
}
foreach ($request["users"] as $key => $users) {
$digitzingInbox = new Inbox;
$digitzingInbox->file = json_encode($request[$files]);
$digitzingInbox->order_id = $request->order_id;
$digitzingInbox->order_name = $request->order_name;
$digitzingInbox->width = $request->width;
$digitzingInbox->height = $request->height;
$digitzingInbox->placement = $request->placement;
$digitzingInbox->format = $request->format;
$digitzingInbox->fabric = $request->fabric;
$digitzingInbox->instruction = $request->instruction;
$digitzingInbox->to_user = $users;
$digitzingInbox->from_user = Auth::user()->id;
$digitzingInbox->type = 2;
$digitzingInbox->save();
}
我认为这是不言自明的,该文件可能不存在于文件夹中。查找名称是否匹配。