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

169
Views
Internal server error 500 when uploading a CSV file using AJAX

I have a very simple web app for uploading CSV files to my server. For that purpose, I'm using AJAX and JQUERY under DJANGO:

function Upload_Bonds(){
        var csrftoken = getCookie('csrftoken');
        var formData = new FormData(document.getElementById("formUploadBonds")); 
        var add_answer = confirm("Confirm uploading and processing of csv File?" );
        if (add_answer) {
               $.ajax({
                    url: "/cvs/DealStore/upload_bonds/", 
                    type: "POST", 
                    data: formData, 
                    async: false,
                    cache: false,
                    contentType: false,
                    enctype: 'multipart/form-data',
                    processData: false,
                    success: function (data) {
                        $('#message').html("<p class='text-center text-success font-weight-bold'>Success</p>");
                        window.alert("Data populated, please check the Bonds list table!");
                     },
                     error: function(data) {
                          $("#message").html("<p class='text-center text-danger font-weight-bold'>Failed</p>");
                     }
                   });
               }
      }    

However, every time I try to use the function, I'm receiving POST 500 (Internal server error). I was able to capture the following on the browser console:

enter image description here

Any idea about how to handle this error? I deployed the app on another server and works fine. So maybe is something about server configuration. (I'm using Linux servers)

Thanks!

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!