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

101
Views
How to upload File from ajax to django backend?

Any ideia how to upload File (.pdf) from ajax to django backend ?

customerForm.addEventListener('submit', e => {
e.preventDefault()
$.ajax({
    type: 'POST',
    url: '',
    data: {
        'csrfmiddlewaretoken': csrf[0].value,
        'identity_type': $('#id_identity_type').val(),
        'identity_number': $('#id_identity_number').val(),
        'file': $('#id_file').val()
    },
    success: function(response) {
        console.log('SUCCESS')
    },
    error: function(error) {
        console.log(error)
    }
})

Thank You

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There are a lot of ways but Here's a link it's simple I think

https://www.youtube.com/watch?v=g3h1OC3S5Lo

He/She explains how to upload file using ajax.

over 4 years ago · Santiago Trujillo 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!