-
-
Save zoffixznet/68fc6b860f2bb34318cdbc8c5f8622c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub startup { | |
my $self = shift; | |
my $r = $self->routes; | |
$r->get('/' => sub { | |
shift->render( | |
text => <<'END' | |
<form action="/upload" method="post" enctype="multipart/form-data"> | |
<input type="submit" class="button" value="Send"> | |
<input id="file_upload" type="file" name="file"> | |
</form> | |
END | |
); | |
}); | |
$r->post('/upload' => sub { | |
print "Test\n"; | |
shift->render(json => { status => 'ok' }) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment