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 376761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:37:50+00:00 2026-05-12T14:37:50+00:00

UPDATE : thanks to posters below, it’s clear that the official documentation is up-to-date.

  • 0

UPDATE : thanks to posters below, it’s clear that the official documentation is up-to-date. Best to read that carefully rather than skim a bunch of other pages that turn up in Google.


I keep finding examples and snippets for uploading files in Django, but then reading people saying that they’re out of date.

Here are my basic confusions (from seeing various examples) around the web.

Do I have to save the file data myself manually (ie. open a file and write it, as in this example) or does Django now save the file automatically when I save a model which has a field of type File?

Do I have to manually get the file data from somewhere in order to copy it in to this field in the model? I mean, I understand that request.FILES is deprecated) but when I upload a file from a custom HTML-form (using a <input type=”file” tag) the cleaned_data for this field is None, even though the request.FILES dictionary still seems to contain the data. So how am I meant to pick up the file data and put it into the model’s field? (If that’s what I’m meant to do?)

cheers

phil

  • 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-12T14:37:50+00:00Added an answer on May 12, 2026 at 2:37 pm

    The docs are very good regarding this, and are up-to-date.

    For basic file uploading, simply use a FileField in your form. Passing in request.POST and request.FILES to this form will do the work for you. Certainly, request.FILES is not deprecated as far as I can tell.

    Now, if you want to do more fancy stuff with your file uploads, that is when you’ll have to potentially break away from the default FileField, but again, this is covered quite well in the documentation.

    I will also add that one common mistake is forgetting to have enctype="multipart/form-data" in one’s form. Not including this results in request.FILES being empty.

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

Sidebar

Related Questions

UPDATE: Solved. Thanks BusyMark! EDIT: This is revised based on the answer below from
[Update: Thanks to Craigy's suggestion below, I cleaned up my code a little and
UPDATE Thanks to feedback below I was able to home in on ADPlus.vbs, which
Update: Thanks a lot to everybody who responded!!! It made me feel that I'm
UPDATE : Thanks for all the quick responses. Should have probably clarified that I've
Update: Thanks for closing my question because it might solicit opinions or discussion. That
Update Thanks to Marc's help the AlphaPagedList class is now available on CodePlex if
Update: Thanks guys, I didn't realize it was very close to zero but not
UPDATE: Thanks for all your help guys! I just need to take a litte
Update: Thanks everbody, things are working 100% now with this query: SELECT e.entry_id FROM

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.