import { useFile } from '@cap-rel/smartcommon'; function ImageUploader() { const { resizeImage } = useFile(); const handleFile = async (e) => { const file = e.target.files[0]; const base64 = await resizeImage(file, { maxWidth: 1200, maxHeight: 1200, quality: 80 }); // Envoyer au serveur await api.private.post('files', { json: { filename: file.name, content: base64 } }); }; return ; }