Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed typo in streaming multipart upload recipe
  • Loading branch information
kraih committed Feb 1, 2012
1 parent c8e3e4d commit 463c2aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -532,15 +532,15 @@ which can be combined to solve some of hardest problems in web development.
# Upload form
get '/' => 'index';

# Streaming upload (will be invoked twice, due to early "request" event)
# Streaming multipart upload (invoked twice, due to early "request" event)
post '/upload' => sub {
my $self = shift;

# First invocation, subscribe to "part" event to find the right one
return $self->req->content->on(part => sub {
my ($multi, $single) = @_;

# Subscribe to "body" event or part to make sure we have all headers
# Subscribe to "body" event of part to make sure we have all headers
$single->on(body => sub {
my $single = shift;

Expand All @@ -565,7 +565,7 @@ which can be combined to solve some of hardest problems in web development.
@@ index.html.ep
<!DOCTYPE html>
<html>
<head><title>Streaming upload</title></head>
<head><title>Streaming multipart upload</title></head>
<body>
% my @attrs = (method => 'POST', enctype => 'multipart/form-data');
%= form_for upload => @attrs => begin
Expand Down

0 comments on commit 463c2aa

Please sign in to comment.