title: Sending Multi Image from Flutter to Laravel
body: <p>i am coding this new Ecommerce App where the user should add products, so i used Multi_Image_picker package where it let him choose multiple images and make them a List...</p>
  <p>so i searched google how to convert this list to a file list and found a way i am using in my database code where i want to send all of this files to laravel backend:</p>
  <pre><code>     // String Prodcut Url/
    final productUrl =
        MyApp.defaultUrl + &quot;/api/ecommerce/products/store?api_token=$token&quot;;
  
    // Get Dio
    var dio = Dio();
    try {
      List&lt;MultipartFile&gt; allMultiFiles = [];
      for (Asset asset in images) {
        ByteData byteData = await asset.getByteData();
        List&lt;int&gt; imageData = byteData.buffer.asUint8List();
        var multipartFile = new MultipartFile.fromBytes(
          imageData,
          filename: basename(asset.name),
        );
        allMultiFiles.add(multipartFile);
      }
  
      var productData = FormData.fromMap({
        'store_id': storeId,
        'name': productName,
        'description': description,
        'category_id': categoryId,
        'price': price,
        'currency': currency,
        'is_discount': isDiscount,
        'images': allMultiFiles,
      });
  
      print(productData.files);
  
      var response = await dio.post(productUrl, data: productData);
  
      // Decoding The Request
      var responseArray = jsonDecode(response.data);
  
      print(responseArray);
        } catch (e) {
          // Returning error if exist
          print(e);
          return e;
        }
  </code></pre>
  <p>There is more code up there but for the space..</p>
  <p>its giving me this reply</p>
  <pre><code>I/flutter (16670): FormatException: Unexpected character (at character 1)
  I/flutter (16670): Illuminate\Http\UploadedFile Object
  I/flutter (16670): ^
  </code></pre>
  <p>welp my php code is:</p>
  <p>public function store(Request $request)
  {</p>
  <pre><code>    $validated = $request-&gt;validate([
          'store_id' =&gt; 'required',
          'name' =&gt; 'required',
          'description' =&gt; 'required',
          'price' =&gt; 'required',
          'currency' =&gt; 'required',
          // 'images' =&gt; 'required',
      ]);
      $images_path = array();
      if ($request-&gt;file('images')) {
          foreach ($request-&gt;file('images') as $file) {
              $images_path[] = $file-&gt;store('public/uploads/products_images');
          }
      }
      $product = Products::create([
          'store_id' =&gt; $request-&gt;input('store_id'),
          'name' =&gt; $request-&gt;input('name'),
          'description' =&gt; $request-&gt;input('description'),
          'category_id' =&gt; $request-&gt;input('category_id'),
          'price' =&gt; $request-&gt;input('price'),
          'currency' =&gt; $request-&gt;input('currency'),
          'images' =&gt; json_encode($images_path),
          'is_discount' =&gt; $request-&gt;input('is_discount'),
      ]);
  
      return json_encode(['success' =&gt; $product]);
  }
  </code></pre>
  <p>so if someone can help me to understand why this error is happening here</p>