Skip to content

Instantly share code, notes, and snippets.

@carzacc
Created February 2, 2020 13:54
Show Gist options
  • Save carzacc/f86551ee0de4ba18997686dd77ed08c0 to your computer and use it in GitHub Desktop.
Save carzacc/f86551ee0de4ba18997686dd77ed08c0 to your computer and use it in GitHub Desktop.
(String filename, String url) async {
var request = http.MultipartRequest('POST', Uri.parse(url));
request.files.add(
await http.MultipartFile.fromPath(
'picture',
filename
)
);
var res = await request.send();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment