Skip to content

Instantly share code, notes, and snippets.

View tamalchowdhury's full-sized avatar
🔍
Specializing

Tamal Anwar Chowdhury tamalchowdhury

🔍
Specializing
View GitHub Profile
@tamalchowdhury
tamalchowdhury / app.jsx
Created May 10, 2022 08:41
Upload image in the client using Base64 strings
import { useState } from "react"
/**
* Takes a file from the file browser and
* converts into a base64 string
* Shows an alert when the file type does not match
* Function is outside so it can be portable
* @param {Blob} file
* @returns {Promise}
*/
5.1 3.5 1.4 .2 Setosa
4.9 3 1.4 .2 Setosa
4.7 3.2 1.3 .2 Setosa
4.6 3.1 1.5 .2 Setosa
5 3.6 1.4 .2 Setosa
5.4 3.9 1.7 .4 Setosa
4.6 3.4 1.4 .3 Setosa
5 3.4 1.5 .2 Setosa
4.4 2.9 1.4 .2 Setosa