Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
Getting MalFormed Xml error while uploading large files to S3 using aws amplify resumable uploading

Error :

AWSS3UploadTask - error completing upload MalformedXML: The XML you provided was not well-formed or did not` validate against our published schema

Code :

export async function uploadVideoFile(file, progressChange) {
  const fileName = `${file.name}`;
  const dirName = 'xyz'
  const key = `${dirName}/${fileName}`;


  // return;
  try {
    const upload =  await Storage.put(key, file ,{
      resumable: true,
      errorCallback(err){
        console.log(`my error : ${err}`);

      },
      progressCallback(prog) {
        console.log((prog.loaded / prog.total) * 100)
        progressChange((prog.loaded / prog.total) * 100);


      },
    }
    
    
    );
    return upload
  } catch (err) {
    console.log(`storage error : ${err}`);
    throw err;
  }
}
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Just Add

ETag in Expose Headers in S3 bucket CORS configuration

<ExposeHeader>ETag</ExposeHeader>
about 4 years ago · Juan Pablo Isaza Report

0

As per Chetan Khanna 's answer above just add it in JSON in 2022:

 "ExposeHeaders": [
             "ETag",
             "x-amz-meta-custom-header"
  ]

taken from: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/cors.html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!