[Tip of the Week] Upload Progress Indicator

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Tip of the Week] Upload Progress Indicator

Fletcher Sandbeck
Tip of the week for February 24, 2006 shows a technique for displaying an upload progress indicator when uploading files using an HTML form and Lasso's file upload tags.

<http://www.omnipilot.com/TotW.1768.9061.lasso>


Past tips of the week can be viewed in the right sidebar of the current tip of the week.  Recent tips of the week include:

- Useful Array Tags
<http://www.omnipilot.com/TotW.1768.9046.lasso>

- JavaScript Feeds for Syndicated Content
<http://www.omnipilot.com/TotW.1768.9035.lasso>

- RSS Displayer
<http://www.omnipilot.com/TotW.1768.9030.lasso>


Comments, corrections, or ideas for future tips of the week are appreciated and can be sent to <[hidden email]>.

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Studio Guy                      http://www.lassostudio.com
OmniPilot Software, Inc.                http://www.omnipilot.com


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Greg Willits-2
On Feb 23, 2006, at 10:29 PM, Fletcher Sandbeck wrote:

> Tip of the week for February 24, 2006 shows a technique for  
> displaying an upload progress indicator when uploading files using  
> an HTML form and Lasso's file upload tags.
> <http://www.omnipilot.com/TotW.1768.9061.lasso>

Perfect timing, I was just finishing up an uploads page and wanted to  
add this very type of thing.

Schweet.

-- gw


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Jono-2
In reply to this post by Fletcher Sandbeck
OK, before you guys get too excited, this is a different thing to the  
solution Pier sorted out. What his does is show progress of the  
upload, true progress of the upload.

So Pier's advances in proportion to the percentage complete of the  
actual upload.


On 24/02/2006, at 8:49 PM, Greg Willits wrote:

> On Feb 23, 2006, at 10:29 PM, Fletcher Sandbeck wrote:
>
>> Tip of the week for February 24, 2006 shows a technique for  
>> displaying an upload progress indicator when uploading files using  
>> an HTML form and Lasso's file upload tags.
>> <http://www.omnipilot.com/TotW.1768.9061.lasso>
>
> Perfect timing, I was just finishing up an uploads page and wanted  
> to add this very type of thing.
>
> Schweet.
>
> -- gw
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage


Jono

// ---------------------------------------------------------
/*
     Jonathan Guthrie
     xServe Ltd, Wellington NZ
     [hidden email]   |   http://xserve.co.nz   | +64 21 678890

*/
// ---------------------------------------------------------




------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Greg Willits-2
In reply to this post by Fletcher Sandbeck
Understood, but this was all I needed for my purposes. I was excited  
to not have to search for the JS :-)

-- gw


On Feb 24, 2006, at 12:23 AM, Jono wrote:

> OK, before you guys get too excited, this is a different thing to  
> the solution Pier sorted out. What his does is show progress of the  
> upload, true progress of the upload.
>
> So Pier's advances in proportion to the percentage complete of the  
> actual upload.
>
>
> On 24/02/2006, at 8:49 PM, Greg Willits wrote:
>
>> On Feb 23, 2006, at 10:29 PM, Fletcher Sandbeck wrote:
>>
>>> Tip of the week for February 24, 2006 shows a technique for  
>>> displaying an upload progress indicator when uploading files  
>>> using an HTML form and Lasso's file upload tags.
>>> <http://www.omnipilot.com/TotW.1768.9061.lasso>
>>
>> Perfect timing, I was just finishing up an uploads page and wanted  
>> to add this very type of thing.
>>
>> Schweet.
>>
>> -- gw



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Fletcher Sandbeck
In reply to this post by Fletcher Sandbeck
On 2/24/06 at 9:23 PM by [hidden email] (Jono):

>OK, before you guys get too excited, this is a different thing to the  
>solution Pier sorted out. What his does is show progress of the  
>upload, true progress of the upload.
>
>So Pier's advances in proportion to the percentage complete of the  
>actual upload.

I think what you'll have to do to get true percentage completion with a Lasso only solution is open a listener port and direct the Web client to submit the form and upload the file to that port.  Then, you can check the content-size and report on the progress in a global variable while you read in the post args.

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Studio Guy                      http://www.lassostudio.com
OmniPilot Software, Inc.                http://www.omnipilot.com


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Alex Pilson
In reply to this post by Fletcher Sandbeck
At 8:30 AM -0800 2/24/06, Fletcher Sandbeck wrote:

>On 2/24/06 at 9:23 PM by [hidden email] (Jono):
>
>>OK, before you guys get too excited, this is a different thing to the
>>solution Pier sorted out. What his does is show progress of the
>>upload, true progress of the upload.
>>
>>So Pier's advances in proportion to the percentage complete of the
>>actual upload.
>
>I think what you'll have to do to get true percentage completion
>with a Lasso only solution is open a listener port and direct the
>Web client to submit the form and upload the file to that port.
>Then, you can check the content-size and report on the progress in a
>global variable while you read in the post args.

Can you explain in further detail how to achieve this port listening
concept? I would love to implement that.

Thanks.

--
<?------------------------------------------------------------------------------/>
     Alex Pilson          FlagShip Hosting, LLC
     800.592.6781     <http://www.flagshiphosting.com>
<?------------------------------------------------------------------------------/>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Fletcher Sandbeck
In reply to this post by Fletcher Sandbeck
On 2/24/06 at 11:33 AM by [hidden email] (Alex Pilson):

>>I think what you'll have to do to get true percentage completion
>>with a Lasso only solution is open a listener port and direct the
>>Web client to submit the form and upload the file to that port.
>>Then, you can check the content-size and report on the progress in a
>>global variable while you read in the post args.
>
>Can you explain in further detail how to achieve this port listening
>concept? I would love to implement that.

It would be a bit of a project.  You basically want to implement your own HTTP server to accept the file upload from the browser.

You can use [Net->Listen] to listen for communication on an incoming port.  You can open ports greather than 1024 and they go up to 32768 or so.  The idea would be to select an unused port, send that port in the form response attribute <form response="http://www.example.com:32000/TOKEN" method="post" enctype="...">, then in an asynchronous thread open a listener on that port.  Once the client opens a connection you can spin off another asynchronous thread which reads in the HTTP headers for client size and TOKEN, creates an entry in a global map using the TOKEN provided by the user (like a unique id), reads in the POST args which contain the file data, and finally writes out the files either to a temp location like the normal file upload functionality does or directly.  Then you need to return an HTML page as the response, probably just redirecting the user back into your Web site on port 80.

<?LassoScript
        Variable: 'Listener' = (Net);
        $Listener->(Bind: 32000);
        $Listener->(Listen);
        Variable: 'Connection' = $Listener->Accept;
                ...
        $Connection->Close;
        $Listener->Close;
?>

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Studio Guy                      http://www.lassostudio.com
OmniPilot Software, Inc.                http://www.omnipilot.com


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

jasonhuck
In reply to this post by Fletcher Sandbeck
Sounds like you have it all worked out, Fletcher.

How soon will you have it finished?

<:P


- jason




On 2/24/06, Fletcher Sandbeck <[hidden email]> wrote:

> On 2/24/06 at 11:33 AM by [hidden email] (Alex Pilson):
>
> >>I think what you'll have to do to get true percentage completion
> >>with a Lasso only solution is open a listener port and direct the
> >>Web client to submit the form and upload the file to that port.
> >>Then, you can check the content-size and report on the progress in a
> >>global variable while you read in the post args.
> >
> >Can you explain in further detail how to achieve this port listening
> >concept? I would love to implement that.
>
> It would be a bit of a project.  You basically want to implement your own HTTP server to accept the file upload from the browser.
>
> You can use [Net->Listen] to listen for communication on an incoming port.  You can open ports greather than 1024 and they go up to 32768 or so.  The idea would be to select an unused port, send that port in the form response attribute <form response="http://www.example.com:32000/TOKEN" method="post" enctype="...">, then in an asynchronous thread open a listener on that port.  Once the client opens a connection you can spin off another asynchronous thread which reads in the HTTP headers for client size and TOKEN, creates an entry in a global map using the TOKEN provided by the user (like a unique id), reads in the POST args which contain the file data, and finally writes out the files either to a temp location like the normal file upload functionality does or directly.  Then you need to return an HTML page as the response, probably just redirecting the user back into your Web site on port 80.
>
> <?LassoScript
>         Variable: 'Listener' = (Net);
>         $Listener->(Bind: 32000);
>         $Listener->(Listen);
>         Variable: 'Connection' = $Listener->Accept;
>                 ...
>         $Connection->Close;
>         $Listener->Close;
> ?>
>
> [fletcher]
> --
> Fletcher Sandbeck                         [hidden email]
> Lasso Studio Guy                      http://www.lassostudio.com
> OmniPilot Software, Inc.                http://www.omnipilot.com
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>


--
Find and Share Free Lasso Custom Tags at tagSwap.net!
Download over 100 open source Lasso custom tags, and post your own for
others to use. RSS feeds track the newest and most popular tags.
http://tagSwap.net/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Mark Schneider
In reply to this post by Fletcher Sandbeck
I've been using this trick for a few months and it's a great way to do it.
BUT I'd still love an "easy" way to show real progress percentages.
Rumpus WFM has this capability....not sure how he does it tho'

for those interested, you can find the looping progress .gif I use here:

http://www.composingroom.com/_Ordering/images/progressbar_01.gif

I'll send you the .psd (imageready) file if you contact me directly

schnide <at> composingroom.com


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Alex Pilson
In reply to this post by Fletcher Sandbeck
At 8:49 AM -0800 2/24/06, Fletcher Sandbeck wrote:

>On 2/24/06 at 11:33 AM by [hidden email] (Alex Pilson):
>
>>>I think what you'll have to do to get true percentage completion
>>>with a Lasso only solution is open a listener port and direct the
>>>Web client to submit the form and upload the file to that port.
>>>Then, you can check the content-size and report on the progress in a
>>>global variable while you read in the post args.
>>
>>Can you explain in further detail how to achieve this port listening
>>concept? I would love to implement that.
>
>It would be a bit of a project.  You basically want to implement
>your own HTTP server to accept the file upload from the browser.
>
>You can use [Net->Listen] to listen for communication on an incoming
>port.  You can open ports greather than 1024 and they go up to 32768
>or so.  The idea would be to select an unused port, send that port
>in the form response attribute <form
>response="http://www.example.com:32000/TOKEN" method="post"
>enctype="...">, then in an asynchronous thread open a listener on
>that port.  Once the client opens a connection you can spin off
>another asynchronous thread which reads in the HTTP headers for
>client size and TOKEN, creates an entry in a global map using the
>TOKEN provided by the user (like a unique id), reads in the POST
>args which contain the file data, and finally writes out the files
>either to a temp location like the normal file upload functionality
>does or directly.  Then you need to return an HTML page as the
>response, probably just redirecting the user back into your Web site
>on port 80.
>
><?LassoScript
> Variable: 'Listener' = (Net);
> $Listener->(Bind: 32000);
> $Listener->(Listen);
> Variable: 'Connection' = $Listener->Accept;
> ...
> $Connection->Close;
> $Listener->Close;
>?>

Cool thanks! Sounds pretty easy to implement. Rrrrriiiiighttt. ;)

--
<?------------------------------------------------------------------------------/>
     Alex Pilson          FlagShip Hosting, LLC
     800.592.6781     <http://www.flagshiphosting.com>
<?------------------------------------------------------------------------------/>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Fletcher Sandbeck
In reply to this post by Fletcher Sandbeck
On 2/24/06 at 1:15 PM by [hidden email] (Alex Pilson):

>Cool thanks! Sounds pretty easy to implement. Rrrrriiiiighttt. ;)

It's more of a weekend project.

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Studio Guy                      http://www.lassostudio.com
OmniPilot Software, Inc.                http://www.omnipilot.com


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Pier Kuipers
In reply to this post by Fletcher Sandbeck
Why, indeed... which reminds me of one of the side-effects of going
the Perl route with this progress-bar thing: when doing that, you're
handing over the entire upload process to Perl, and Lasso's built-in
file upload tags are rendered useless. I suppose it's not that big a
deal once you get your head around it, but it *is* a bit of a pain
having to worry about a tmp directory littered with cancelled uploads
etc.

Fletcher, your listener port option sounds fascinating, though I'm
sure it results in similar issues (i.e. making the lasso upload tags
redundant). But if I could get away from having to play with Perl, I'd
be much happier ... ;-)

Cheers

Pier

On 2/24/06, Fletcher Sandbeck <[hidden email]> wrote:

> On 2/24/06 at 11:33 AM by [hidden email] (Alex Pilson):
>
> >>I think what you'll have to do to get true percentage completion
> >>with a Lasso only solution is open a listener port and direct the
> >>Web client to submit the form and upload the file to that port.
> >>Then, you can check the content-size and report on the progress in a
> >>global variable while you read in the post args.
> >
> >Can you explain in further detail how to achieve this port listening
> >concept? I would love to implement that.
>
> It would be a bit of a project.  You basically want to implement your own HTTP server to accept the file upload from the browser.
>
> You can use [Net->Listen] to listen for communication on an incoming port.  You can open ports greather than 1024 and they go up to 32768 or so.  The idea would be to select an unused port, send that port in the form response attribute <form response="http://www.example.com:32000/TOKEN" method="post" enctype="...">, then in an asynchronous thread open a listener on that port.  Once the client opens a connection you can spin off another asynchronous thread which reads in the HTTP headers for client size and TOKEN, creates an entry in a global map using the TOKEN provided by the user (like a unique id), reads in the POST args which contain the file data, and finally writes out the files either to a temp location like the normal file upload functionality does or directly.  Then you need to return an HTML page as the response, probably just redirecting the user back into your Web site on port 80.
>
> <?LassoScript
>         Variable: 'Listener' = (Net);
>         $Listener->(Bind: 32000);
>         $Listener->(Listen);
>         Variable: 'Connection' = $Listener->Accept;
>                 ...
>         $Connection->Close;
>         $Listener->Close;
> ?>
>
> [fletcher]
> --
> Fletcher Sandbeck                         [hidden email]
> Lasso Studio Guy                      http://www.lassostudio.com
> OmniPilot Software, Inc.                http://www.omnipilot.com
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>


--
Pier Kuipers
66 St. Aidan's Drive
Goatstown
Dublin 14
iReland
Tel. +353 1 216 4939
Mobile +353 87 294 3063


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Steffan A. Cline
In reply to this post by Fletcher Sandbeck
The only problem that comes to mind and has not been answered. How does all
this get the actual file size before the upload to calculate the percentage?
I checked and the browser does not send the file size to the server before
beginning the upload. Anyone know?




Thanks

Steffan

---------------------------------------------------------------
T E L  6 0 2 . 5 7 9 . 4 2 3 0 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
Steffan A. Cline
[hidden email]                             Phoenix, Az
http://www.ExecuChoice.net                                  USA
AIM : SteffanC          ICQ : 57234309
The Executive's Choice in Lasso driven Internet Applications
                                  Lasso Partner Alliance Member
---------------------------------------------------------------



> From: Pier Kuipers <[hidden email]>
> Reply-To: <[hidden email]>
> Date: Sat, 25 Feb 2006 20:04:10 +0000
> To: <[hidden email]>
> Subject: Re: [Tip of the Week] Upload Progress Indicator
>
> Why, indeed... which reminds me of one of the side-effects of going
> the Perl route with this progress-bar thing: when doing that, you're
> handing over the entire upload process to Perl, and Lasso's built-in
> file upload tags are rendered useless. I suppose it's not that big a
> deal once you get your head around it, but it *is* a bit of a pain
> having to worry about a tmp directory littered with cancelled uploads
> etc.
>
> Fletcher, your listener port option sounds fascinating, though I'm
> sure it results in similar issues (i.e. making the lasso upload tags
> redundant). But if I could get away from having to play with Perl, I'd
> be much happier ... ;-)
>
> Cheers
>
> Pier
>
> On 2/24/06, Fletcher Sandbeck <[hidden email]> wrote:
>> On 2/24/06 at 11:33 AM by [hidden email] (Alex Pilson):
>>
>>>> I think what you'll have to do to get true percentage completion
>>>> with a Lasso only solution is open a listener port and direct the
>>>> Web client to submit the form and upload the file to that port.
>>>> Then, you can check the content-size and report on the progress in a
>>>> global variable while you read in the post args.
>>>
>>> Can you explain in further detail how to achieve this port listening
>>> concept? I would love to implement that.
>>
>> It would be a bit of a project.  You basically want to implement your own
>> HTTP server to accept the file upload from the browser.
>>
>> You can use [Net->Listen] to listen for communication on an incoming port.
>> You can open ports greather than 1024 and they go up to 32768 or so.  The
>> idea would be to select an unused port, send that port in the form response
>> attribute <form response="http://www.example.com:32000/TOKEN" method="post"
>> enctype="...">, then in an asynchronous thread open a listener on that port.
>> Once the client opens a connection you can spin off another asynchronous
>> thread which reads in the HTTP headers for client size and TOKEN, creates an
>> entry in a global map using the TOKEN provided by the user (like a unique
>> id), reads in the POST args which contain the file data, and finally writes
>> out the files either to a temp location like the normal file upload
>> functionality does or directly.  Then you need to return an HTML page as the
>> response, probably just redirecting the user back into your Web site on port
>> 80.
>>
>> <?LassoScript
>>         Variable: 'Listener' = (Net);
>>         $Listener->(Bind: 32000);
>>         $Listener->(Listen);
>>         Variable: 'Connection' = $Listener->Accept;
>>                 ...
>>         $Connection->Close;
>>         $Listener->Close;
>> ?>
>>
>> [fletcher]
>> --
>> Fletcher Sandbeck                         [hidden email]
>> Lasso Studio Guy                      http://www.lassostudio.com
>> OmniPilot Software, Inc.                http://www.omnipilot.com
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription:
>> http://www.listsearch.com/lassotalk.lasso?manage
>>
>
>
> --
> Pier Kuipers
> 66 St. Aidan's Drive
> Goatstown
> Dublin 14
> iReland
> Tel. +353 1 216 4939
> Mobile +353 87 294 3063
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage




------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Pier Kuipers
In reply to this post by Fletcher Sandbeck
Slightly (or even completely) baffled by that myself. It seems that as
soon as the first few bytes are received on the server-end, perl is
able to read the {CONTENT_LENGTH} info from the POST data and
establish the total file size. Fletcher seems to point that out by
mentioning "Reading in the POST args". So in theory, you could have
perl abort the upload if the size exceeds a certain limit...

On 2/25/06, Steffan A. Cline <[hidden email]> wrote:

> The only problem that comes to mind and has not been answered. How does all
> this get the actual file size before the upload to calculate the percentage?
> I checked and the browser does not send the file size to the server before
> beginning the upload. Anyone know?
>
>
>
>
> Thanks
>
> Steffan
>
> ---------------------------------------------------------------
> T E L  6 0 2 . 5 7 9 . 4 2 3 0 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
> Steffan A. Cline
> [hidden email]                             Phoenix, Az
> http://www.ExecuChoice.net                                  USA
> AIM : SteffanC          ICQ : 57234309
> The Executive's Choice in Lasso driven Internet Applications
>                                   Lasso Partner Alliance Member
> ---------------------------------------------------------------
>
>
>
> > From: Pier Kuipers <[hidden email]>
> > Reply-To: <[hidden email]>
> > Date: Sat, 25 Feb 2006 20:04:10 +0000
> > To: <[hidden email]>
> > Subject: Re: [Tip of the Week] Upload Progress Indicator
> >
> > Why, indeed... which reminds me of one of the side-effects of going
> > the Perl route with this progress-bar thing: when doing that, you're
> > handing over the entire upload process to Perl, and Lasso's built-in
> > file upload tags are rendered useless. I suppose it's not that big a
> > deal once you get your head around it, but it *is* a bit of a pain
> > having to worry about a tmp directory littered with cancelled uploads
> > etc.
> >
> > Fletcher, your listener port option sounds fascinating, though I'm
> > sure it results in similar issues (i.e. making the lasso upload tags
> > redundant). But if I could get away from having to play with Perl, I'd
> > be much happier ... ;-)
> >
> > Cheers
> >
> > Pier
> >
> > On 2/24/06, Fletcher Sandbeck <[hidden email]> wrote:
> >> On 2/24/06 at 11:33 AM by [hidden email] (Alex Pilson):
> >>
> >>>> I think what you'll have to do to get true percentage completion
> >>>> with a Lasso only solution is open a listener port and direct the
> >>>> Web client to submit the form and upload the file to that port.
> >>>> Then, you can check the content-size and report on the progress in a
> >>>> global variable while you read in the post args.
> >>>
> >>> Can you explain in further detail how to achieve this port listening
> >>> concept? I would love to implement that.
> >>
> >> It would be a bit of a project.  You basically want to implement your own
> >> HTTP server to accept the file upload from the browser.
> >>
> >> You can use [Net->Listen] to listen for communication on an incoming port.
> >> You can open ports greather than 1024 and they go up to 32768 or so.  The
> >> idea would be to select an unused port, send that port in the form response
> >> attribute <form response="http://www.example.com:32000/TOKEN" method="post"
> >> enctype="...">, then in an asynchronous thread open a listener on that port.
> >> Once the client opens a connection you can spin off another asynchronous
> >> thread which reads in the HTTP headers for client size and TOKEN, creates an
> >> entry in a global map using the TOKEN provided by the user (like a unique
> >> id), reads in the POST args which contain the file data, and finally writes
> >> out the files either to a temp location like the normal file upload
> >> functionality does or directly.  Then you need to return an HTML page as the
> >> response, probably just redirecting the user back into your Web site on port
> >> 80.
> >>
> >> <?LassoScript
> >>         Variable: 'Listener' = (Net);
> >>         $Listener->(Bind: 32000);
> >>         $Listener->(Listen);
> >>         Variable: 'Connection' = $Listener->Accept;
> >>                 ...
> >>         $Connection->Close;
> >>         $Listener->Close;
> >> ?>
> >>
> >> [fletcher]
> >> --
> >> Fletcher Sandbeck                         [hidden email]
> >> Lasso Studio Guy                      http://www.lassostudio.com
> >> OmniPilot Software, Inc.                http://www.omnipilot.com
> >>
> >>
> >> ------------------------------
> >> Lasso Support: http://support.omnipilot.com/
> >> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> >> Manage your list subscription:
> >> http://www.listsearch.com/lassotalk.lasso?manage
> >>
> >
> >
> > --
> > Pier Kuipers
> > 66 St. Aidan's Drive
> > Goatstown
> > Dublin 14
> > iReland
> > Tel. +353 1 216 4939
> > Mobile +353 87 294 3063
> >
> >
> > ------------------------------
> > Lasso Support: http://support.omnipilot.com/
> > Search the list archives: http://www.listsearch.com/lassotalk.lasso
> > Manage your list subscription:
> > http://www.listsearch.com/lassotalk.lasso?manage
>
>
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>


--
Pier Kuipers
66 St. Aidan's Drive
Goatstown
Dublin 14
iReland
Tel. +353 1 216 4939
Mobile +353 87 294 3063


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Greg Willits-2
In reply to this post by Fletcher Sandbeck
Ah, that _would_ be handy. Right now the ability to defend against an  
upload oriented DOS attack is is pretty weak. Knowing the upload size  
before it is actually completed would be very handy. Not only from a  
security perspective, but also from a UI perspective that you can  
tell someone in the file is too big much earlier in the process.

I shall continue to lurk on this one.

-- gw


On Feb 25, 2006, at 2:16 PM, Pier Kuipers wrote:

> Slightly (or even completely) baffled by that myself. It seems that as
> soon as the first few bytes are received on the server-end, perl is
> able to read the {CONTENT_LENGTH} info from the POST data and
> establish the total file size. Fletcher seems to point that out by
> mentioning "Reading in the POST args". So in theory, you could have
> perl abort the upload if the size exceeds a certain limit...
>
> On 2/25/06, Steffan A. Cline <[hidden email]> wrote:
>> The only problem that comes to mind and has not been answered. How  
>> does all
>> this get the actual file size before the upload to calculate the  
>> percentage?
>> I checked and the browser does not send the file size to the  
>> server before
>> beginning the upload. Anyone know?


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

decorior
In reply to this post by Fletcher Sandbeck
Hi, All:

We are back from our show!

We have used an alternative approach from javazoom.com. I know this  
is heresy!

But it uses the client to do a lot of the dirty work like image  
scaling. This has reduced the size of the file into our servers  
dramatically, etc.

It also allows upload of folders in one shot and shows progress very  
nicely.

 From a usability standpoint, our clients LOVE the ability to do drag  
and drop!

Deco


On Feb 25, 2006, at 3:43 PM, Greg Willits wrote:

> Ah, that _would_ be handy. Right now the ability to defend against  
> an upload oriented DOS attack is is pretty weak. Knowing the upload  
> size before it is actually completed would be very handy. Not only  
> from a security perspective, but also from a UI perspective that  
> you can tell someone in the file is too big much earlier in the  
> process.
>
> I shall continue to lurk on this one.
>
> -- gw
>
>
> On Feb 25, 2006, at 2:16 PM, Pier Kuipers wrote:
>
>> Slightly (or even completely) baffled by that myself. It seems  
>> that as
>> soon as the first few bytes are received on the server-end, perl is
>> able to read the {CONTENT_LENGTH} info from the POST data and
>> establish the total file size. Fletcher seems to point that out by
>> mentioning "Reading in the POST args". So in theory, you could have
>> perl abort the upload if the size exceeds a certain limit...
>>
>> On 2/25/06, Steffan A. Cline <[hidden email]> wrote:
>>> The only problem that comes to mind and has not been answered.  
>>> How does all
>>> this get the actual file size before the upload to calculate the  
>>> percentage?
>>> I checked and the browser does not send the file size to the  
>>> server before
>>> beginning the upload. Anyone know?
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Eric Landmann
In reply to this post by Fletcher Sandbeck
Deco Rior <[hidden email]> wrote on Saturday, February 25, 2006:

>We have used an alternative approach from javazoom.com. I know this  
>is heresy!
>
>But it uses the client to do a lot of the dirty work like image  
>scaling. This has reduced the size of the file into our servers  
>dramatically, etc.
>
>It also allows upload of folders in one shot and shows progress very  
>nicely.
>
> From a usability standpoint, our clients LOVE the ability to do drag  
>and drop!

Well I guess that is cool, but it doesn't solve the problem for some of us who want high-res files (say 80Mb or so). It would be great to be able to set a filesize limit and check it before all the bandwidth is wasted on a 100Mb file.

--Eric


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

decorior
In reply to this post by Fletcher Sandbeck
Hi, Eric:

The applet I talk about allows filesize checking, etc. It actually  
has a ton of features (skinable, filetype limit, control of progress  
bar. etc.).

I would check out the website for the complete list, but if you use  
ftp as the protocol this is hard to beat featurewise.

Deco

On Feb 28, 2006, at 3:11 PM, Eric Landmann wrote:

> Deco Rior <[hidden email]> wrote on Saturday, February  
> 25, 2006:
>
>> We have used an alternative approach from javazoom.com. I know this
>> is heresy!
>>
>> But it uses the client to do a lot of the dirty work like image
>> scaling. This has reduced the size of the file into our servers
>> dramatically, etc.
>>
>> It also allows upload of folders in one shot and shows progress very
>> nicely.
>>
>> From a usability standpoint, our clients LOVE the ability to do drag
>> and drop!
>
> Well I guess that is cool, but it doesn't solve the problem for  
> some of us who want high-res files (say 80Mb or so). It would be  
> great to be able to set a filesize limit and check it before all  
> the bandwidth is wasted on a 100Mb file.
>
> --Eric
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

Bil Corry
In reply to this post by Fletcher Sandbeck
Deco Rior wrote:
> The applet I talk about allows filesize checking, etc. It actually has a
> ton of features (skinable, filetype limit, control of progress bar. etc.).

It's very similar to JUpload:

  http://jupload.biz/


- Bil



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [Tip of the Week] Upload Progress Indicator

decorior
In reply to this post by Fletcher Sandbeck
Yes,

javazoom supports both ftp and the http post while jUpload supports  
only http post.

In our case we needed the former.

The second feature we wanted was the scaling feature. Javazoom allows  
us to scale images prior to data transfer. This is obviously nice  
since most of our customers do not and don't want to scale their  
pictures from the camera, and we don't want to scale them on the  
server and pay for the bandwidth!

There are in fact several java based products out there ranging in  
price, etc.

Deco
On Feb 28, 2006, at 9:54 PM, Bil Corry wrote:

> Deco Rior wrote:
>> The applet I talk about allows filesize checking, etc. It actually  
>> has a ton of features (skinable, filetype limit, control of  
>> progress bar. etc.).
>
> It's very similar to JUpload:
>
>  http://jupload.biz/
>
>
> - Bil
>
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  http://www.listsearch.com/ 
> lassotalk.lasso?manage



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
12