exportasyncfunctionuploadImage({
file,
assetUrl,
presignUrl,
headers ={},}: Props): string{{// NOTE: Presigned put doesn't require form data, and status code is 200 instead of 204constresp=awaitfetch(presignUrl,{
headers,method: 'PUT',body: file,});if(resp.status!==200){thrownewError(`Unable to upload image "${file.name}"`);}}returnassetUrl;}