const API_BASE = '/api/v1'; async function upload(file) { const formData = new FormData(); formData.append('file', file); const res = await fetch(API_BASE + '/upload', { method: 'POST', body: formData }); return await res.json(); }