Skip to content

Commit

Permalink
fix: file upload to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
KishenKumarrrrr committed Feb 8, 2024
1 parent cc67b8b commit a42f401
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/src/core/middlewares/file-attachment.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,11 @@ async function uploadFileToPresignedUrl(
)
try {
// 3. Upload file to presigned URL
const response = await axios.put(presignedUrl, uploadedFile, {
const response = await axios.put(presignedUrl, uploadedFile.data, {
headers: {
'Content-Type': uploadedFile.mimetype,
},
withCredentials: false,
timeout: 30 * 1000, // 30 Seconds
})
// 4. Return the etag and transactionId to the FE
const formattedEtag = removeFirstAndLastCharacter(response.headers.etag)
Expand Down

0 comments on commit a42f401

Please sign in to comment.