Re: Re: Suggestions of some good, simple file upload 'in progress' code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 21, 2009 at 11:35 PM, Michael Shadle <mike503@xxxxxxxxx> wrote:
> On Tue, Apr 21, 2009 at 9:02 PM, scubak1w1 <skiwi@xxxxxxxxxxx> wrote:
>>
>> ""scubak1w1"" <skiwi@xxxxxxxxxxx> wrote in message
>> news:CF.13.21597.2EE8EE94@xxxxxxxxxxxxxxx
>>> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux