fix: handle invalid credentials err while uploading file in form

This commit is contained in:
prafull-opensignlabs
2024-10-09 11:39:59 +05:30
parent 6a4124fdf0
commit d8b2a80e90
3 changed files with 16 additions and 14 deletions
@@ -30,7 +30,7 @@ async function uploadFileToS3(buffer, fileName, mimeType, adapter) {
const presignedUrl = await getSignedUrl(client, getCommand, { expiresIn: 900 }); // URL expiration time in seconds (e.g., 15 min)
return presignedUrl;
} catch (error) {
console.error('Error uploading file to aws:', error);
console.error('Error uploading file to aws:', error?.message);
throw error;
}
}