Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6070983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:59:43+00:00 2026-05-23T09:59:43+00:00

I have a template where the user can input data about himself, and upload

  • 0

I have a template where the user can input data about himself, and upload his photo. Photo uploading will be done using ajax, with a separate upload button inside the form. My question is how do I upload the photo (when the user clicks on the upload button) and then save the user info when the user clicks on the submit button.

The model looks like this:

class User(models.Model):
    name = models.CharField(max_length=50)
    # some other fields
    image = models.ImageField(upload_to="assets/images")

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:59:44+00:00Added an answer on May 23, 2026 at 9:59 am

    You could return the id of the User instance you used to save the picture as part of your js callback/success function, use it to populate a hidden field, and then call that user instance and save the rest of the info when the user submits the form.

    The bigger question is, especially given that the user is going to submit the form anyway, why do you want to save just the image first?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my admin, I have a text area where the user can input html:
I have a ASP.NET GridView that uses template columns and user controls to allow
I have template function compare defined as below. #include<iostream> using namespace std; template<typename T>
we have a template project we often copy. so we can costumize the copy
I have a page which displays a form that a logged-in user can use
What I have done so far I have created a website using CGI::Application and
I am uploading a PDF using the codeigniter upload library, the PDF is uploaded
I have created this editor template: @model DateTime? @using MyMvcApp.Properties <div id=dateTimePicker_@(ViewData.ModelMetadata.PropertyName)> <script type=text/javascript
I want to render some json data using HTML template. I haven't started implementing
I have a search page where user can submit queries that try to match

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.