Laravel:尝试上传多个文件时出错

问题描述 投票:0回答:1

我正在尝试上传多个图像,但不幸的是,我收到错误“消息”:“文件“phpzP428U.png”不存在”,我该如何解决这个问题?谢谢。

退货要求

dd($request->all())

enter image description here

收件箱控制器

  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();
    }
php laravel
1个回答
-1
投票

我认为这是不言自明的,该文件可能不存在于文件夹中。查找名称是否匹配。

© www.soinside.com 2019 - 2024. All rights reserved.