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

349
Views
Microsoft graph client: cancel One drive large file upload fail with a 404

Like explained in the documentation https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/tasks/LargeFileUploadTask.md , I try to cancel a large file upload with the following:

  const options: OneDriveLargeFileUploadOptions = {
    path: destinationDirectory,
    fileName: stream.name,
    conflictBehavior: 'rename',
    rangeSize: 1024 * 1024
  };

  const fileObject = new FileUpload(
    stream.content,
    stream.name,
    stream.content.size
  );
  
  const task = await OneDriveLargeFileUploadTask.createTaskWithFileObject(
    client,
    fileObject,
    options
  );
  
  await task.upload();
  // when needed:
  task.cancel();

The cancel method generates a DELETE request on the url of the upload session but it returns 404 and the upload continues, and the file is created in my OneDrive directory.

about 4 years ago · Juan Pablo Isaza
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!