Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart http image upload

var postUri = Uri.parse("apiUrl");

http.MultipartRequest request = new http.MultipartRequest("POST", postUri);

http.MultipartFile multipartFile = await http.MultipartFile.fromPath(
    'file', filePath); 

request.files.add(multipartFile);

http.StreamedResponse response = await request.send();


print(response.statusCode);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dart #http #image #upload
ADD COMMENT
Topic
Name
2+2 =