Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
On Wed, Apr 22, 2009 at 2:41 PM, haliphax wrote: > On Wed, Apr 22, 2009 at 11:25 AM, Michael Shadle wrote: >> On Wed, Apr 22, 2009 at 6:20 AM, haliphax wrote: >> >>> Michael, >>> >>> Given the fact that Gears requires a client-side installation, has an >>> awful penetration percentage, and his original solution is all >>> server-side (though it does require APC and YUI-JS), I wouldn't say >>> this is a very good suggestion. Compared to what he has already found, >>> the Gears solution is not "clean" by any stretch of the imagination. >> >> a) the native solution that requires APC is not multi-webserver capable >> b) i was just sharing a different approach to an idea. who knows. it >> might be something to explore. gears is pretty lightweight, and for >> the ease of this and the functionality it brings (not to mention >> cross-browser+platform) i see a compelling reason to give it a shot. >> c) the APC method -still- requires webserver tweaks and post max size >> etc. this is sending small chunks of data, is proxy-safe, and requires >> nothing on the server; all that is required is gears, which is a >> library to extend your browser's capabilities and i have not heard any >> issues with it or security holes thus far. penetration is an issue but >> when more sites push it and say "hey, you should install it" the >> penetration will grow. not to mention youtube for example is using >> roughly the same method and picking up a lot of browser installs off >> that. > >> i completely disagree it is not "clean" - it is literally one browser >> addon that a lot of people do have, comes from a reputable company, >> and creates basically limitless upload capabilities - i can do 300 meg >> files without blinking - it's not one long single POST that can fail >> anytime, it's lots of small POST requests; it takes basic PHP on the >> server and then some javascript for the UI (all the pieces to get a >> basic functional install i sent links to) > > Unless you are in a corporate environment where you control what is > installed on your visitors' machines, then just about any server-side > hell you have to put yourself through is "cleaner" to the client than > them needing to install ANYTHING. > > I'm sorry if my opinion seems a little too "black and white," but > those are the breaks. I can definitely say that, coming from a higher > education institution standpoint, the site I work on would ALWAYS do > something server-side and exhaust all of those possibilities before > forcing prospective students, applicants, etc. to download additional > software for their web browser. > > It depends on the clientele, really. It also depends on the servers. If you're behind load balanced webservers, the APC solution is out. If you're on a shared hosting solution, it most likely is out (due to some config tweaking) You're limited to the POST size limits and other file upload limitations inside of php.ini on the server etc. If your clientele find it useful enough, they will download it. People are stupid enough to click on viruses, why would they not click on something that comes from a reputable source as well, and promises them large file uploads, looks like it is part of the website (and not some hokey looking UI from an applet) and is SSL-friendly, proxy-friendly, etc, etc... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
On Wed, Apr 22, 2009 at 11:25 AM, Michael Shadle wrote: > On Wed, Apr 22, 2009 at 6:20 AM, haliphax wrote: > >> Michael, >> >> Given the fact that Gears requires a client-side installation, has an >> awful penetration percentage, and his original solution is all >> server-side (though it does require APC and YUI-JS), I wouldn't say >> this is a very good suggestion. Compared to what he has already found, >> the Gears solution is not "clean" by any stretch of the imagination. > > a) the native solution that requires APC is not multi-webserver capable > b) i was just sharing a different approach to an idea. who knows. it > might be something to explore. gears is pretty lightweight, and for > the ease of this and the functionality it brings (not to mention > cross-browser+platform) i see a compelling reason to give it a shot. > c) the APC method -still- requires webserver tweaks and post max size > etc. this is sending small chunks of data, is proxy-safe, and requires > nothing on the server; all that is required is gears, which is a > library to extend your browser's capabilities and i have not heard any > issues with it or security holes thus far. penetration is an issue but > when more sites push it and say "hey, you should install it" the > penetration will grow. not to mention youtube for example is using > roughly the same method and picking up a lot of browser installs off > that. > i completely disagree it is not "clean" - it is literally one browser > addon that a lot of people do have, comes from a reputable company, > and creates basically limitless upload capabilities - i can do 300 meg > files without blinking - it's not one long single POST that can fail > anytime, it's lots of small POST requests; it takes basic PHP on the > server and then some javascript for the UI (all the pieces to get a > basic functional install i sent links to) Unless you are in a corporate environment where you control what is installed on your visitors' machines, then just about any server-side hell you have to put yourself through is "cleaner" to the client than them needing to install ANYTHING. I'm sorry if my opinion seems a little too "black and white," but those are the breaks. I can definitely say that, coming from a higher education institution standpoint, the site I work on would ALWAYS do something server-side and exhaust all of those possibilities before forcing prospective students, applicants, etc. to download additional software for their web browser. It depends on the clientele, really. -- // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
On Wed, Apr 22, 2009 at 6:20 AM, haliphax wrote: > Michael, > > Given the fact that Gears requires a client-side installation, has an > awful penetration percentage, and his original solution is all > server-side (though it does require APC and YUI-JS), I wouldn't say > this is a very good suggestion. Compared to what he has already found, > the Gears solution is not "clean" by any stretch of the imagination. a) the native solution that requires APC is not multi-webserver capable b) i was just sharing a different approach to an idea. who knows. it might be something to explore. gears is pretty lightweight, and for the ease of this and the functionality it brings (not to mention cross-browser+platform) i see a compelling reason to give it a shot. c) the APC method -still- requires webserver tweaks and post max size etc. this is sending small chunks of data, is proxy-safe, and requires nothing on the server; all that is required is gears, which is a library to extend your browser's capabilities and i have not heard any issues with it or security holes thus far. penetration is an issue but when more sites push it and say "hey, you should install it" the penetration will grow. not to mention youtube for example is using roughly the same method and picking up a lot of browser installs off that. flash started out as a baby too. even java did (inside of browsers) ... i completely disagree it is not "clean" - it is literally one browser addon that a lot of people do have, comes from a reputable company, and creates basically limitless upload capabilities - i can do 300 meg files without blinking - it's not one long single POST that can fail anytime, it's lots of small POST requests; it takes basic PHP on the server and then some javascript for the UI (all the pieces to get a basic functional install i sent links to) how is that not "cleaner" than requiring the right version of apc, hoping that one single long POST doesn't fail, etc? our next version will include re-transmission on any chunk failure and some other stuff, too. we're talking about literally any file size, and even multiple file support, with the capability to retry on failure so you -know- your file will get there, no matter if you're on fast broadband or third world connectivity. we've dealt with issues for years with people in geos having to send us links to files and have us upload them for them... not anymore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
nobody knows my last creation? http://code.google.com/p/noswfupload/ full example with PHP back end in the zip. P.S. ... just in case ... the first upload progress for PHP with Ajax and NO APC ( ages ago, still me: http://www.devpro.it/upload_progress/ ) Flash FileReference porting ... still me, before SWFUpload solution or others Flash based: http://www.devpro.it/FileReference/ Finally, last attemp before noswfupload, jQuery plus APC for uplaod progress meter: http://webreflection.blogspot.com/2007/10/upload-progress-bar-with-php5-apc-and.html I kinda worked with "uploaders" since I used bottle I guess :D Regards > Date: Wed, 22 Apr 2009 08:20:28 -0500 > From: halip...@gmail.com > To: php-general@lists.php.net > Subject: Re: [PHP] Re: Suggestions of some good, simple file upload 'in > progress' code? > > On Tue, Apr 21, 2009 at 11:35 PM, Michael Shadle wrote: > > On Tue, Apr 21, 2009 at 9:02 PM, scubak1w1 wrote: > >> > >> ""scubak1w1"" wrote in message > >> news:cf.13.21597.2ee8e...@pb1.pair.com... > >>> Hello, > >>> > >>> Can someone pass on some suggestions of some good, simple file upload 'in > >>> progress' code? > >>> > >>> Maybe as simple as changing the cursor icon for the duration? > >> > >> [self snip!] > >> > >> http://www.johnboy.com/about-us/news/a-useful-php-file-upload-progress-meter > >> seems to be the "cleanest" example I can find - would this be fair to say? > > > > Google Gears makes it very easy and can make it very simple (no > > webserver configuration required) to basically slice the file up and > > send chunks via POST - I need to publish all the code and a howto, and > > Valery has written some code for nginx that might make it alleviate > > the need for PHP to be involved at all - I have still not tested that > > though, but the PHP code required is only like 10 lines or so, the > > Gears stuff is pretty basic Javascript and since it's Javascript you > > can make it match your UI perfectly by filling in div tags or whatever > > else you want (works great with jQuery) > > > > Actually I have a demo, not the cleanest code if you view the source > > but you get the idea. It also works over NFS with multiple webservers > > writing to the same file (I have 3 webservers behind LVS so > > technically your request could be going to any of them) > > > > http://mikehost.com/~mike/tmp/u/ <- frontend and view source to see gears + > > js > > http://mikehost.com/~mike/tmp/u/temp.php.txt <- server side piece > > > > I can't find the latest/cleanest code, but it gives you an idea. > > Michael, > > Given the fact that Gears requires a client-side installation, has an > awful penetration percentage, and his original solution is all > server-side (though it does require APC and YUI-JS), I wouldn't say > this is a very good suggestion. Compared to what he has already found, > the Gears solution is not "clean" by any stretch of the imagination. > > > Greg, > > I believe the link you posted is a very elegant solution that does not > (at first glance) involve Flash objects or Java applets. I'm a little > disappointed that a particular JS framework is necessary, but that's > just the nature of the beast with this sort of thing. If I were you, > I'd run with the "native" PHP solution you've already found. Maybe you > can even crack open the JS and find a way to do it with your favorite > framework as opposed to YUI... > > > My 2c, > > > -- > // Todd > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
On Tue, Apr 21, 2009 at 11:35 PM, Michael Shadle wrote: > On Tue, Apr 21, 2009 at 9:02 PM, scubak1w1 wrote: >> >> ""scubak1w1"" wrote in message >> news:cf.13.21597.2ee8e...@pb1.pair.com... >>> Hello, >>> >>> Can someone pass on some suggestions of some good, simple file upload 'in >>> progress' code? >>> >>> Maybe as simple as changing the cursor icon for the duration? >> >> [self snip!] >> >> http://www.johnboy.com/about-us/news/a-useful-php-file-upload-progress-meter >> seems to be the "cleanest" example I can find - would this be fair to say? > > Google Gears makes it very easy and can make it very simple (no > webserver configuration required) to basically slice the file up and > send chunks via POST - I need to publish all the code and a howto, and > Valery has written some code for nginx that might make it alleviate > the need for PHP to be involved at all - I have still not tested that > though, but the PHP code required is only like 10 lines or so, the > Gears stuff is pretty basic Javascript and since it's Javascript you > can make it match your UI perfectly by filling in div tags or whatever > else you want (works great with jQuery) > > Actually I have a demo, not the cleanest code if you view the source > but you get the idea. It also works over NFS with multiple webservers > writing to the same file (I have 3 webservers behind LVS so > technically your request could be going to any of them) > > http://mikehost.com/~mike/tmp/u/ <- frontend and view source to see gears + js > http://mikehost.com/~mike/tmp/u/temp.php.txt <- server side piece > > I can't find the latest/cleanest code, but it gives you an idea. Michael, Given the fact that Gears requires a client-side installation, has an awful penetration percentage, and his original solution is all server-side (though it does require APC and YUI-JS), I wouldn't say this is a very good suggestion. Compared to what he has already found, the Gears solution is not "clean" by any stretch of the imagination. Greg, I believe the link you posted is a very elegant solution that does not (at first glance) involve Flash objects or Java applets. I'm a little disappointed that a particular JS framework is necessary, but that's just the nature of the beast with this sort of thing. If I were you, I'd run with the "native" PHP solution you've already found. Maybe you can even crack open the JS and find a way to do it with your favorite framework as opposed to YUI... My 2c, -- // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
On Tue, Apr 21, 2009 at 9:02 PM, scubak1w1 wrote: > > ""scubak1w1"" wrote in message > news:cf.13.21597.2ee8e...@pb1.pair.com... >> Hello, >> >> Can someone pass on some suggestions of some good, simple file upload 'in >> progress' code? >> >> Maybe as simple as changing the cursor icon for the duration? > > [self snip!] > > http://www.johnboy.com/about-us/news/a-useful-php-file-upload-progress-meter > seems to be the "cleanest" example I can find - would this be fair to say? Google Gears makes it very easy and can make it very simple (no webserver configuration required) to basically slice the file up and send chunks via POST - I need to publish all the code and a howto, and Valery has written some code for nginx that might make it alleviate the need for PHP to be involved at all - I have still not tested that though, but the PHP code required is only like 10 lines or so, the Gears stuff is pretty basic Javascript and since it's Javascript you can make it match your UI perfectly by filling in div tags or whatever else you want (works great with jQuery) Actually I have a demo, not the cleanest code if you view the source but you get the idea. It also works over NFS with multiple webservers writing to the same file (I have 3 webservers behind LVS so technically your request could be going to any of them) http://mikehost.com/~mike/tmp/u/ <- frontend and view source to see gears + js http://mikehost.com/~mike/tmp/u/temp.php.txt <- server side piece I can't find the latest/cleanest code, but it gives you an idea. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Suggestions of some good, simple file upload 'in progress' code?
""scubak1w1"" wrote in message news:cf.13.21597.2ee8e...@pb1.pair.com... > Hello, > > Can someone pass on some suggestions of some good, simple file upload 'in > progress' code? > > Maybe as simple as changing the cursor icon for the duration? [self snip!] http://www.johnboy.com/about-us/news/a-useful-php-file-upload-progress-meter seems to be the "cleanest" example I can find - would this be fair to say? Cheers... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php