[Catalyst] UploadProgress 0.04

Adam Herzog adam at herzogdesigns.com
Tue Jun 12 23:46:32 GMT 2007


On Jun 12, 2007, at 1:50 PM, Andy Grundman wrote:
> I've just released UploadProgress 0.04, which contains the  
> following 2 fixes:
>
> * Allow plugin to work at non-root locations.
> * Detect aborted uploads and stop the javascript polling.

Andy,

Works great. The non-root change you made seems much better than what  
I proposed, since it doesn't require any additional javascript (like  
mine did.)

I made a couple small doc changes. 03podcoverage.t failed;  
prepare_body had no documentation. Updated the documentation for  
dispatch() to reflect the URI change. Also updated the pod tests to  
always run if MANIFEST.SKIP is present (as the Catalyst-Runtime  
distro does).

I thought about adding a warning about the potential of the plugin  
accidentally intercepting a request it shouldn't have, but stopped  
short. Probably too unlikely to warrant confusing the user with the  
warning.

-A

Index: t/03podcoverage.t
===================================================================
--- t/03podcoverage.t   (revision 6463)
+++ t/03podcoverage.t   (working copy)
@@ -2,6 +2,6 @@
eval "use Test::Pod::Coverage 1.04";
plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV 
{TEST_POD};
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV 
{TEST_POD} || -f 'MANIFEST.SKIP';
all_pod_coverage_ok();
Index: t/02pod.t
===================================================================
--- t/02pod.t   (revision 6463)
+++ t/02pod.t   (working copy)
@@ -2,6 +2,6 @@
eval "use Test::Pod 1.14";
plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV 
{TEST_POD};
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV 
{TEST_POD} || -f 'MANIFEST.SKIP';
all_pod_files_ok();
Index: lib/Catalyst/Plugin/UploadProgress.pm
===================================================================
--- lib/Catalyst/Plugin/UploadProgress.pm       (revision 6463)
+++ lib/Catalyst/Plugin/UploadProgress.pm       (working copy)
@@ -268,9 +268,13 @@
Takes each chunk of incoming upload data and updates the upload progress
record with new information.
+=head2 prepare_body
+
+Detects if the user stopped the upload.
+
=head2 dispatch
-Watches for the special URI /progress?progress_id=<id> and returns the
+Watches for a URI ending with '?progress_id=<id>' and returns the
JSON output from C</upload_progress_output>.
=head2 setup




More information about the Catalyst mailing list