File upload through flutter web and Nodejs, multer….

file.name
file.bytes
file.size
file.extension
file.path = null

Packages used

Multer

base64-to-image

Flutter File Picker

Flutter Http

Flutter code to pick and make API call

Backend Nodejs code for accepting file

Json format req should send{       "filename":"arpit",
"userId":"abcd1234",
"base64url": "/9j/4AAQSkZJRgABAQEAYABgAAD/4TDKRXhpZgAATU0AKg
AAAAgABAExAAIAAAALAAAQSodpAAQAAAABAAAQVoglAAQAAAABAAAgouocAAc
AABAMAAAAPgAAAAAc6gAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ........."
}*base64 url is to big to display

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arpit Sharma

Arpit Sharma

14 Followers

Software Engineer (SIH2020 winner | React developer | Flask web framework | Redux | Flutter | Mongodb | REST APIs | ) | Ex Bajaj Finserv health intern