34 Comments
- theundefined, on 10/12/2007, -4/+29I'm the one who submited the story as well as coding the presented solution. You might be surprised, but I'm not a very big fan of Ajax either. I would almost never use it on the front-end of any website I make, but I do think it's good for enhancing the experience of the administrator of a website. So please keep the anti-Web 2.0 comments on a reasonable level since it makes you sound like some dark-age-lets-burn-the-witch-person. Thanks.
- Xoligy, on 10/12/2007, -5/+18Shut up, please. This is a tech website. AJAX is technology (well it's a method, but it's related to technology). Every time an AJAX related story/article gets front page, someone always moans about if getting front page.
If you don't like it, don't click on it! You can see it's AJAX related, yet still you feel the need to comment on it. - Xoligy, on 10/12/2007, -1/+8You're right, it isn't new. I can't find one place where it says it's new, or revolutionary. It simply provides a script for people to use. Stop trying to find faults in it simply because it uses AJAX methods.
It will work with the majority of setups. Not a specific mod.
Rails is a framework. Not everyone wants to use a framework. Anyway, this is for PHP, not Ruby. So what's your point? It's still a useful script.
This is a good example of where AJAX is used correctly. It provides extra functionality without bloat. - fletchowns, on 10/12/2007, -1/+6cool script. maybe add a transfer speed readout?
- Wootery, on 10/12/2007, -0/+3They do something like this over at YouSendIt.com, I believe.
What licenece is this using? - pornel, on 10/12/2007, -0/+3On Opera 9 it seems to update only once.
- donda, on 10/12/2007, -2/+5I like AJAX, just same kind of idea, meaing AJAX upload stuff must been submitted 99 times. try search 'upload AJAX' to see what you get. These are related frontpage articles,
http://digg.com/programming/File-Upload_Script_With_Embedded_AJAX_Progress_Bar
http://digg.com/programming/PHP_AJAX:_Upload_Progress_Meter_(for_file_uploads_in_forms)
http://digg.com/programming/Use_Ajax_To_Upload_Files
http://digg.com/programming/AJAX_File-Upload_Progress_Script_w_Easy_Install
For this reason alone, no digg. - theundefined, on 10/12/2007, -1/+3You sure can, it should be really easy, just take the time between two ajax refreshes and the data difference and you should almost have it.
- serpicolugnut, on 10/12/2007, -1/+3Doesn't work in Safari. No digg.
- ThankTheCheese, on 10/12/2007, -0/+2yea i can confirm that it doesn't work in safari. It also uploads a new window with some weird code :( Still much better than what I could do!
- Skettalee, on 10/12/2007, -0/+2Hey you guys, can anyone help me out... this is my delima... I could seriously use an ajax uploader or a nice uploader period because i constantly have clients needing to send me files to work on projects and i either have to get them to send through a messenger, email or yousendit.com type site. Id love to link them to something like http://upload.337studios.com and they can upload anything they want there. I tried uber uploader but it needs CGI-BIN which I dont have access to on my 1and1.com linux business package.. they only let me use premade cgi scripts they make... How can i make an upload webpage using just php or something like that? Can anyone direct me to that? Thanks in advance!
- gerkin, on 10/12/2007, -0/+1Best one I've tried yet is w2box for anyone who cares :)
- theundefined, on 10/12/2007, -1/+2Hi Skettalee: As far as my research has showed there is no *pure* php solution that works on shared hosting enviornment. The problem is that you don't get access to the raw post data before it completly reached the server. Now there is a hack for php 4.3.10 that allows you to do so, but you have to compile your own php-binary for this, and you need your own server to run it. So I figured using perl was the easiest work around, even so I know that it could be nicer : /.
So your options are either looking for another host, or just go with an animated *plz-be-patient* graphic. - Xoligy, on 10/12/2007, -0/+1It is possible I believe by checking the size of the temporary file, then doing the maths from there.
When data is sent to the script it is first uploaded to a temporary folder. It is possible to read the size of this whilst it is still uploading, thus being able to see how much has been uploaded. - theundefined, on 10/12/2007, -2/+3Hey eridius, I never claimed to have invented the entire thing. It's just an easy to use implemenatation for CakePHP I've done a while ago and thought that it could be useful to others.
- Xoligy, on 10/12/2007, -1/+1Your reasons for not digging are true. But as he said, some scripts are improvements on others. I don't see why people are digging him down for sticking up for his work.
- Skettalee, on 10/12/2007, -1/+1I dont mind the please be patient graphic. How can i get this done? Link me to some code.. thank you so much for your reply!
- morgs, on 10/12/2007, -0/+0w2box is wicked. I added heaps of stuff myself so that I could use it in a more business than personal way. Public can upload, private can access and download files. Also sends a notification email. Clem gets back to you via email and is open to ideas.
http://labs.beffa.org/w2box/ - elvirs, on 10/12/2007, -0/+0these days there is tendency of publishing every kind of stuff with lots of adsense next to it:)
popularity of ajax increases revenue of adsense leechers:) - Trenton, on 10/12/2007, -1/+1I like the fact of the progress bar itself, but the idea of an ajax uploader is not a new one. Ajax is really nice to know, and glad that I know a bit about a byte. =)
- sibsoft, on 10/12/2007, -1/+0Actually, do not need ajax here. Why everyone stick to AJAX? Fashion? I think so. You can easily display progress bar without reloading progress bar window without AJAX. We've done that without any problems and it works perfectly on any browser. Take a look here: http://www.sibsoft.net/xupload.html - Upload progress bar with dynamic progress bar _without_ AJAX.
- catoutfit, on 10/12/2007, -3/+2at least one too many? how do you suggest they would do it with 2 less?
just use PHP?...nope that wouldnt work.....
just use JS...nope that wouldn't work... - Datrio, on 10/12/2007, -2/+1No digg. My personal comment on this: this is just another solution of making an AJAX progress bar, which works with the help of Perl.
And yes, it is possible to do it with PHP, but you have to have some special extensions and permissions on your web server. Either you must have the ability to define the temporary upload path or use glob() to find the temporary file you're uploading right now.
Redirect the current upload to the iframe and refresh the main website with AJAX, showing the progress bar.
Of course, the solution that's showed here works every time, and Perl is installed most of the time with PHP on web servers. It's just that I don't like languages which I don't understand, and Perl is one of them (bite me).
Easy - just doesn't work everywhere. - f00xx0riz3r, on 10/12/2007, -3/+1I checked this the first time around, and it uses a extremely messy perl-script for handling the gory details. To even use this requires three technologies, (ajax/js, php, perl) and thats atleast one to many.
As theundefined mention there is no way to solve this with a normal php binary. I understand that, but then again, why not use a java/flash applet for instance instead... if you need this feature so badly. - f00xx0riz3r, on 10/12/2007, -3/+1If you would have bothered to read my second paragraf you would have noticed I already took care of answering your ignorant post.
- theundefined, on 10/12/2007, -5/+2Just because there is more then one browser in the market would you not digg anybodies story about a new browser? sry, doesn't make sense.
- catoutfit, on 10/12/2007, -6/+1delete
- nessup, on 10/12/2007, -9/+4Enough the AJAX progress bars already!!
- eridius, on 10/12/2007, -8/+2The idea of showing a progress bar while uploading files isn't new. It also is pretty much dependent on Apache (and I believe a particular mod). Note that I haven't read the article. Oh, and Rails provides a plugin that makes it really easy to do the progress bar thingy.
- gfw123, on 10/12/2007, -20/+7AJAX,
It makes your teeth turn green.
AJAX,
It tastes like gasoline.
AJAX,
It makes you vomit.
So eat some AJAX,
and vomit today!
Ajax, will make your teeth turn blue.
Ajax, it smells like Elmer's Glue.
Ajax, will make you relax.
So get some Ajax,
And relax today! - jabab, on 10/12/2007, -29/+7How to get on front page of digg:
Link to anything to do with AJAX - fogbog293, on 02/10/2009, -41/+10Everytime I see the word "AJAX" on digg, I feel like I want to vomit.


What is Digg?
Digg is coming to a city (and computer) near you! Check out all the details on our