views:

28

answers:

1

I have a python script that accepts a file from the user and saves it.

Is it possible to not upload the file immediately but to que it up and when the server has less load to upload it then.

Can this be done by transferring the file to the browsers storage area or taking the file from the Harddrive and transferring to the User's RAM?

+3  A: 

There is no reliable way to do what you're asking, because fundamentally, your server has no control over the user's browser, computer, or internet connection. If you don't care about reliability, you might try writing a bunch of javascript to trigger the upload at a scheduled time, but it just wouldn't work if the user closed his browser, navigated away from your web page, turned off his computer, walked away from his wifi signal, etc.

If your web site is really so heavily loaded that it buckles when lots of users upload files at once, it might be time to profile your code, use multiple servers, or perhaps use a separate upload server to accept files and then schedule transfer to your main server later.

Forest