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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:34:13+00:00 2026-05-23T04:34:13+00:00

I have followed the tutorial posted here in order to get AJAX file uploads

  • 0

I have followed the tutorial posted here in order to get AJAX file uploads on my Django app. The thing is that it doesn’t work, and the closest I could get to the issue is finding out that the save_upload() method raises the following exception: ‘WSGIRequest’ object has no attribute ‘read’. Any ideas on what I am doing wrong?

EDIT: I figured out that this is only works in Django 1.3. Any ideeas on how to make it work in Django 1.2?

  • 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-23T04:34:14+00:00Added an answer on May 23, 2026 at 4:34 am

    I think I have gotten to the bottom of your problem.

    1) You are trying to run .read() on a request object, which is not allowed. Instead, you need to run it on request.raw_post_data.

    2) Before you can run .read(), which takes a file-like object, you need to convert it from a str to a file-like object.

    Try this:

    import StringIO
    output = StringIO.StringIO()
    output.write(request.raw_post_data)
    

    …now you’ll be able to run output.read() and get the data you want.

            #loop through, writing more of the file each time
            file_so_far = output.read( 1024 ) #Get ready....
            while file_so_far: #..get set...
              dest.write( file_so_far ) #Go.
              file_so_far = output.read( 1024 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have followed this tutorial which allowed me to create a Silverlight DataGrid that
I have followed the tutorial: Introduction-to-in-app-purchases I think I have everything done exactly how
I have followed the tutorial here http://projectlombok.org/ but after adding import and @Data nothing
I have followed this tutorial and added iAd to my app: http://bees4honey.com/blog/tutorial/how-to-add-iad-banner-in-iphoneipad-app/ But the
I have followed this tutorial to get my ListView populating data -- http://android.amberfog.com/?p=296 .
I have followed many a tutorial to make sure that this is correct but
I have followed this tutorial to use SQLite db in my android app. Since
I have followed Apples tutorial and upgraded my iphone to 3.0. But i get
I have followed an example tutorial online for integrating in-app purchases in to my
I have followed the tutorial on the Haskell wiki about i mplementing an IRC

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.