title: Uploading an Image using Swagger API
body: <p>I am developing an api using Laravel 7 and I use Swagger for API documentation. My issue is that I want to upload images using the Swagger API but it doesn't it only displays [object File] when printing out the images, so I can't upload them to the public folder.
  My store method</p>
  
  <pre><code>/**
   * Store a newly created Products.
   *
   * @param  \Illuminate\Http\Request  $request
   * @return \Illuminate\Http\Response
   *  
   * @OA\Post(
   *     path="/api/products",
   *     tags={"Product"},
   *     @OA\Response(response="200", description="Adding a new Product."),
   * 
   *    @OA\Parameter(
   *     name="name[]",
   *     in="query",
   *     description="Product Name",
   *     required=true,
   *     @OA\Schema(type="array", @OA\Items(type="string")),
   *   ),    
   *    @OA\Parameter(
   *     name="images[]",
   *     in="query",
   *     description="Product Images",
   *     required=true,
   *    @OA\Schema(type="array", @OA\Items(type="file")),
   *   ), 
   *   * )
   * )
   *
   */
  public function upload(Request $request)
  {
  
      $request-&gt;validate([
          "name" =&gt; "required",
          "images" =&gt; "required",
      ]);
  
      $images = $request-&gt;images;
  
      $product = Product::create([]);
  
  
      if(! is_dir(public_path("/products")) ){
          mkdir(public_path("/products"), 0777);
      }
      $id = $product-&gt;id;    
      $imageCollection = Collection::wrap($images);
      $imageCollection-&gt;each(function($image) use ($id){
          $basename = Str::random();
          $original = $basename . "." . $image-&gt;getClientOriginalExtension();
          $image-&gt;move(public_path("/products"), $original);
  
          ProductMedia::create([
              "product_id" =&gt; $id,
              "image" =&gt; "/products/".$original,
          ]);
  
      });
  
      return Product::where("id", $product-&gt;id)-&gt;with("productMedia")-&gt;get();
  
  }
  </code></pre>
  
  <p>How can I add images through Swagger API?</p>