Hi, I use this to upload an image using flutter web, i have trouble in getting the correct filename and the type of image, after I upload the file to fire storage, with a just supplied filename, the type is application/octet-stream. What's the proper way of uploading an image to firestorage with the filename and image type like ('image/jpeg') ?
Hi, I use this to upload an image using flutter web, i have trouble in getting the correct filename and the type of image, after I upload the file to fire storage, with a just supplied filename, the type is application/octet-stream. What's the proper way of uploading an image to firestorage with the filename and image type like ('image/jpeg') ?
code ` FormBuilderImagePicker( name: 'myimage', maxImages: 1, onChanged: (value) { if (value != null) { var selectedImg = value.first; imageFilename = GetIt.I .get()
.uploadImage(selectedImg);
}
},
onSaved: (value) {
vacancy.workRelatedImage = imageFilename;
},
),
` what's inside my ImageRepository is this
` String uploadImage(img) { File file = File.fromRawPath(img); String fileName = basename(file.path);
return path; `
the return path doesn't give me the correct filename. It returns special characters.
Any idea how to achieve this?