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

180
Views
Why is my download failing for most recent csv file?

I am attempting to download the most recently upload csv file. The app is built with express, html, and javascript, just FYI. I have an anchor tag in my index.html file and inside of my app.js file's success callback I am attempting to download the appropriate data. However, I am coming up with Failed - No File. Below you will find my index.html and app.js relevant code:

index.html:

<a href="csv.txt" id="download" download>Download CSV</a>

app.js:

$('form').on('submit', function (event) {
  event.preventDefault();

  var newInfo = document.getElementById('info').files[0];

  var formData = new FormData();
  formData.append("jsonfile", newInfo);

  $.ajax({
    type: 'POST',
    url: '/upload_json',
    data: formData,
    contentType: false,
    processData: false,
    success: function (data) {
      console.log('DATA: ', data);
      $('#csv').html(data);
      $("a").attr("href", data)
    },
    error: function(err) {
      console.log('ERR: ', err.responseText);
    }
  })

});

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!