async function uploadFileToS3(file, getSignedUrl) {
  try {
    const {fileUrl, signedRequestUrl} = await getSignedUrl(file)
    const url = await makeS3Request(fileUrl, signedRequestUrl, file)

    return url
  } catch (e) {
    return alert('Could not upload file.')
  }
}
// and call makeS3Request to upload the file
and call makeS3Request to upload the file
and call makeS3Request to upload the file
async function uploadFileToS3(file, getSignedUrl) {
  try {
    const {fileUrl, signedRequestUrl} = await getSignedUrl(file)
    const url = await makeS3Request(fileUrl, signedRequestUrl, file)
    return url
  } catch (e) {
    return alert('Could not upload file.')
  }
}
async function uploadFileToS3 ( file , getSignedUrl ) { try { const { fileUrl , signedRequestUrl } = await getSignedUrl ( file ) const url = await makeS3Request ( fileUrl , signedRequestUrl , file ) return url } catch ( e ) { return alert ( 'Could not upload file.' ) } }
and call makeS3Request to upload the file
and call makeS3Request to upload the file