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

140
Views
problem download large blob file (600mb+)

When a file is loaded with a volume of more than 600MB, it turns out to be empty. The backend completely unloads the file. Used by Axios. Used downloadjs lib for download. I used a lot of lib who likes downloadjs and the result was the same. How can I implement uploading a large file using Axios ?

response

{data: 'Id;Email;ClientDwhId;Number;16_int;22_datetime;22… headers: {…}, cancelTokenSource: {…}}
cancelTokenSource:
  cancel: ƒ cancel(message)
  token: CancelToken
  promise: Promise
   [[Prototype]]: Promise
   [[PromiseState]]: "pending"
   [[PromiseResult]]: undefined
  [[Prototype]]: Object
 [[Prototype]]: Object
data: "Id;Email;ClientDwhId;Number;16_int;22_datetime;2
headers:
  content-disposition: "attachment; filename=File.csv; filename*=UTF-8''File.csv"
  content-length: "42277"
  content-type: "text/csv"
[[Prototype]]: Object
[[Prototype]]: Object
import * as contentDisposition from 'content-disposition';
import * as downloadjs from 'downloadjs';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import { ApiResponse } from '../api';

const defaultContentType = 'text/plain';
const defaultFilename = 'file.txt';

const downloadFile = (response: ApiResponse<BlobPart>, filename?: string) => {
//create filename
  if (!filename) {
    const parsedContentDisposition =
      response.headers['content-disposition'] &&
      contentDisposition.parse(response.headers['content-disposition']);
    filename =
      parsedContentDisposition && parsedContentDisposition.parameters
        ? parsedContentDisposition.parameters.filename
        : defaultFilename;
  }
//create content type
  const contentType = response.headers['content-type']
    ? response.headers['content-type']
    : defaultContentType;
//function from downloadjs library
  downloadjs(
    new Blob([response.data]), filename, contentType,);
};

export const downloadFileFromStream = (filename?: string) => (
  stream$: Observable<ApiResponse<BlobPart>>,
) => stream$.pipe(tap(response => downloadFile(response, filename))); //run downloadFile function after response
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

We solved the problem on the server side. They began to save the file on the server and send it by reference, without loading the user with a stream.

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!