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

356
Views
Compress request post body Axios

I'm creating a react-web app that must call a post REST post endpoint on Firebase Cloud functions, the only problem is that the typical request that will go through will exceed the 10mb limit:

/**
   * Create a new flyer inside the storage.
   * @param {String} adminID [Identifier of the admin issuing the request]
   * @param {Object} flyer [Flyer to upload in the storage]
   * @returns {Object} [Containing the response]
   */
  postFlyerAsync(adminID,flyer){
    return new Promise((res,rej)=>{
      const URL = endpoint + "postFlyer";
        return axios
        .post(URL,flyer, { params: { adminID: adminID } })
        .then((response) => {
          console.log(response)
          return res(response.data);
        })
        .catch((err) => {
          return rej(err);
        });
    })
  }

does it exist a way to compress the body? I've tried a million different npm packages but they are either not compatible with webpack config or too slow...any suggestions?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No amount of compression will solve your problem.

You can achieve the same security without opening up your storage by having your endpoint return a signed upload url. https://cloud.google.com/storage/docs/access-control/signed-urls

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!