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

91
Views
Download dataurl to file stored on server

I am using this code to download a DataURL to a file

    function downloadURI(uri, name) {
        var link = document.createElement("a");
        link.download = name;
        link.href = uri;
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link);
        delete link;
      }

      downloadURI(data, "images/helloWorld.png");

but it tries to download to user storage. I want to download to server storage (For example download to "images/download.png" rather than prompt the user to download on their computer.

I tried to pass into PHP but the dataurl is too large for ajax to pass through.

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

0

First of all, you need to create some backend code to download it on server storage. You might only need the URI from frontend, make a call on some backend API and then request everything from backend.

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!