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

  • Home
  • SEARCH
  • 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 8292989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:40:43+00:00 2026-06-08T13:40:43+00:00

When I upload a file into django, it first goes through the UploadHandlers. i

  • 0

When I upload a file into django, it first goes through the UploadHandlers. i have used this to write a progress bar. when the upload is complete, the ‘upload file’ view gets called. The request object will have either an InMemoryUploadedFile or a temporary file on disk.

Here is my question: The docs suggest to copy the file chunk by chunk. For a large file, would this not take a long time (with the progress bar stuck at 100%)?

Would it not be better to do a ‘move’ operation? eg on windows you can move a file almost instantly within the same drive letter, copying takes a long time. i believe the same applies on unix systems.

  • 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-06-08T13:40:45+00:00Added an answer on June 8, 2026 at 1:40 pm

    Yes, the same applies to Unix systems… where a “drive letter” is more of a path, so you might find that /opt/django/YourApp and /opt/django/tmpUploadDir are actually two different devices.

    So, trusting on “move” it’s not really worth it, by and large. On the other hand, you may do your copying outside the client viewing process, after he/she has dismissed the “100% complete” dialog.

    Or you might factor the copy time in the total percentage. Say that you know that copy speed is 1 Mb per second, and you observe network upload speed proceeding at 100 Kb per second. Then you know that for a 1 GB file total transfer time will be 1100 seconds (not 1000), and once calculated that the “old” percentage is X, you will be able to display it as X*DiskSpeed/(DiskSpeed + NetworkSpeed). When the user has uploaded 100% of the file, he will see the progress bar at 91%, growing until it reaches 100% when copy is also complete.

    This last method can be used at advantage if your processing is more than a simple copy, e.g. if you are recoding a video through ffmpeg. You do need a good guesstimate of the processing time beforehand, though, otherwise you’ll end up with an “upload” bar that, while nonmonotonic (i.e. you should never see it going from 80% to 79%), will progress in fits and starts.

    My opinion is that compared to upload time, copy time is negligible and may be safely ignored. If it is not, then maybe displaying a second, different progress bar might be in order, so that the user doesn’t see anything he/she might believe “anomalous”.

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

Sidebar

Related Questions

I try this command to upload a file (standard.xml) into table book the file
My testers have discovered that if you type free text into a file upload
I have some code that allows users to upload file attachments into a varbinary(max)
I want to upload image file into couchdb using javascript. For this i am
I want to upload an image file into mysql database on Android Mobile Programming,
I want to upload a csv file into a sql table. Here is my
I wish upload a file into my iphone app via ftp ( wifi connection
I'm attempting to upload a file into a jsp and then use the file
So I have a file object created from a drag and drop into an
I'm trying to implement django-filebrowser into my latest app. I have grappelli installed also.

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.