Not quite a tutorial, but the docs for Dancer::Request::Upload
<https://metacpan.org/pod/Dancer::Request::Upload#SYNOPSIS> contain a good,
simple example:
# somewhere in your view:
<form action="/upload" method="POST" enctype="multipart/form-data">
<input type="file" name="filename">
<input type="submit">
</form>
# and then in your application handler:
post '/upload' => sub {
my $file = request->upload('filename');
$file->copy_to($upload_dir); # or whatever you need
};
On Tue, Sep 2, 2014 at 1:53 PM, Alex Becker <[email protected]> wrote:
> Dear all,
>
> is there a tutorial how to create a Perl upload form with Dancer?
> Something basic and simple like this but without CGI? ->
> http://www.perlmeme.org/tutorials/cgi_upload.html
> Because, when I was a real noob, I learned Perl from scripts like these.
> And I still enjoy learning new things this way.
>
> Regards,
> Alex
>
> _______________________________________________
> dancer-users mailing list
> [email protected]
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users