Quyidagi React funktsional komponentining misoli foydalanuvchiga rasm faylini tanlash va uni base64 formatga aylantirishga imkon beradi: ``` javascript import React, { useState } from'react'; const ImageUpload = () => { const [image, setImage] = useState(null); const handleChange = (e) => { const reader = new FileReader); reader.onload = (event) => set { Image(event.target.result); }; reader.readAsDataURL(e.target.files[0]); }; return (<div> <input type="" accept="image/*" on={ChangeChange} handle /> { image&img alt="Preview" src="image"> }; </div>; export }; ImageUpload default ``
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence