title: DioError [DioErrorType.RESPONSE]: Http status error [404]
body: <p><a href="https://i.stack.imgur.com/xU760.png" rel="nofollow noreferrer">Postman form-data request</a></p>
  <p><a href="https://i.stack.imgur.com/BXJwo.png" rel="nofollow noreferrer">Request body containing </a></p>
  <p><a href="https://i.stack.imgur.com/ZfWdJ.png" rel="nofollow noreferrer">Expected Response body</a></p>
  <p>Dio Flutter code</p>
  <pre><code>import 'package:dio/dio.dart';
  import 'package:flutter_project/config/config.dart';
  import '../model/postImage.dart';
  import 'dart:io';
  
  
  
  Future&lt;PostImage&gt; postImage(File image) async{
    String fileName = image.path.split('/').last;
    print(fileName);
  
    try{
      Dio dio = new Dio();
      FormData formData = FormData.fromMap({
        &quot;file&quot;: await MultipartFile.fromFile(image.path,filename: fileName)
      });
      Map&lt;String, String&gt; headers= &lt;String,String&gt;{
        'Content-Type':'multipart/form-data'
      };
      print(&quot;${baseURL}files/upload&quot;);
      Response response = await dio.post(&quot;${baseURL}files/upload&quot;,data: formData);
      if(response.statusCode == 200){
        print(&quot;Uploaded&quot;);
      }
      else{
        print(response.data);
      }
      
    }
    catch(e){
        print(e);
    }
  
  }
  </code></pre>
  <p>Expection that I am getting : DioError [DioErrorType.RESPONSE]: Http status error [404]</p>