Linked Questions
23 questions linked to/from How to upload images to server in Flutter?
1 vote
1 answer
1k views
Erro 502 with dio [duplicate]
How to make upload the image with dio in flutter? void _postHttp() async { try { Dio dio = Dio(); dio.options.contentType = Headers.formUrlEncodedContentType; FormData formData = new FormData....
287 votes
17 answers
537k views
How to save a PNG image server-side, from a base64 data URI
I'm using Nihilogic's "Canvas2Image" JavaScript tool to convert canvas drawings to PNG images. What I need now is to turn those base64 strings that this tool generates, into actual PNG files on the ...
120 votes
20 answers
311k views
How to upload images and file to a server in Flutter?
I use a web service for image processing , it works well in Postman: Now I want to make http request in flutter with Dart: import 'package:http/http.dart' as http; static ocr(File image) ...
22 votes
4 answers
76k views
How to send an image to an api in dart/flutter?
I saw other questions, but thats not what i want, i dont want to upload an image to a server, i dont want to convert to base64... I only want to post a file in a form data or something else and get ...
8 votes
3 answers
9k views
How can I upload a PDF using Dart's HttpClient?
I need to post a PDF file to a remote REST API, and I can't for the life of me figure it out. No matter what I do, the server responds that I have not yet associated an object with the file parameter. ...
2 votes
3 answers
14k views
Flutter image_picker post upload an image
I am using the Flutter Plugin Image_picker to choose images so that I want to upload image after selected the image Future<File> _imageFile; void _onImageButtonPressed(ImageSource source) ...
2 votes
2 answers
4k views
How to upload image using http?
I am trying to upload image using Flutter's http plugin. Following is my code Future<ImageUploadModel> postImage(File photoPath) async { ImageUploadModel imageUploadModel; var request ...
0 votes
2 answers
6k views
Trying to upload the image to server in the flutter using dart
I am new to Flutter development. My problem is that when I try to upload the image to the server I am getting following error: NoSuchMethodError: The getter 'body' was called on null. Receiver: ...
1 vote
1 answer
3k views
POST image to web service with Flutter
I am currently using Flutter and Dart to try to send an image to a web service, after which I wait for a JSON response. The below links show the Postman request that I am trying to mimic. An image of ...
2 votes
2 answers
3k views
image uploading failing using dio package
I am trying to upload an image in flutter using Dio package but its failing. I need to send an image in formdata. API >> needs request body as imageUpload:image Code for image upload static Future ...
0 votes
1 answer
2k views
What should we specify the MediaType in the http.MultipartFile if the media type can be png, jpeg
What should I specify the media type in the content type if the image can be jpeg or png ? var postUri = Uri.parse('$serverUrl/store/signup'); var request = http.MultipartRequest('POST', postUri) .....
0 votes
1 answer
2k views
Sending post request flutter with specific requirements
I need some suggestion on how to send a POST request using the http module in Flutter with some parameters. I need to set the username to a string(in the body of the request), and also need to set a ...
1 vote
1 answer
2k views
how to upload image on flutter to MySQL
I am a newbie in a flutter. Can someone show me how to upload an image to my MySQL? I can't find any solution in the past weeks. My Code: import 'dart:io'; import 'package:flutter/cupertino.dart'; ...
0 votes
1 answer
2k views
Flutter: How do I upload a JSON file to a URL?
I've been searching in vain for a simple way of uploading a JSON file to a specific URL but I haven't been able to find one, for Flutter. I have implemented the code to download a simple JSON file ...
1 vote
1 answer
758 views
Flutter - Before .then is executed, Function is returning the value and after that reading .then
I am facing 2 problems with the below code and I think both are related. createFunction is showing an error - "This function has a return type of 'FutureOr< bool >', but doesn't end with a ...