Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Web Browser File Upload Progress Bar in Perl w/AJAX

by skazat (Chaplain)
on Dec 11, 2006 at 12:10 UTC ( [id://589028]=note: print w/replies, xml ) Need Help??


in reply to Re: Web Browser File Upload Progress Bar in Perl w/AJAX
in thread Web Browser File Upload Progress Bar in Perl w/AJAX

I don't know if that technique applies to file uploads - since your giving a request with a POST - there's no mechanism that I know of that says, "hey, upload 100k of a file, then refresh, and automatically ask for the next 100k chunk". That's not something that server push/client pull can do.

The screen won't refresh on you, until you're done with the POST, which basically will take as long as it takes to upload that file. I'm guessing the way that sites like google video allow you to upload large video files that could literally take hours on a slow connection is a server setting and isn't something you can work around in Perl. I think. (again, I don't know)

I think the technique mentioned in the article is similar to what a lot AJAXy stuff does, the example I just posted included. This article is somewhat of an oldschool way of doing it. The only difference really is that in the AJAX way, it's only part of the screen that gets refreshed, and instead of using a Meta tag, it uses a little Javascript that does a similar thing.

Forking a process is still not the end-all, be-all solution. Processes can still be stopped, killed, haulted, whatever for odd reasons. The only way to get around that is to chunk whatever task you have to do in pieces that you know will run in the time allotted, have a whole lot of meta information/state information around so if you need to restart it at a specific spot, you can. It's a lot of work ;)

 

-justin simoni
skazat me

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://589028]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-19 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found