<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
</span>Have a look on <a href="https://metacpan.org/pod/Dancer::Request::Upload" rel="noreferrer" target="_blank">https://metacpan.org/pod/Dancer::Request::Upload</a><br>
for Dancer2 - Dancer2::Core::Request::Upload.<br>
<br>
Here is a working example for Dancer:<br>
<a href="https://github.com/mestia/simpleshare/blob/8129bc86d9f7b524117bc3d392b6f6a8c886aa69/lib/multifileupload.pm" rel="noreferrer" target="_blank">https://github.com/mestia/simpleshare/blob/8129bc86d9f7b524117bc3d392b6f6a8c886aa69/lib/multifileupload.pm</a><br>
<div class=""><div class="h5"><br>
<br>
_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div></blockquote></div><br><div><div>Hello Alex and Attila,<br><br></div>Been playing with the 
request->upload example but can't but when I hit upload all that 
appears is the "1" in the top left corner of the page.<br><br>my $upload_route = '/upload';<br>my $upload_dir = '/tmp';<br><br>get '/upload' => sub {<br>    template 'upload' => {<br>        upload_file => $upload_route,<br>    };<br>};<br><br>post '/upload' => sub {<br>    my $file = request->upload('file');<br>        my $fname = $file->filename;<br>        my $tmpname = $file->tempname;<br>        my $destination = $upload_dir . '/' . $fname;<br>        $file->copy_to($destination);<br>        unlink $tmpname if -e $tmpname;<br><br>    print "Done\n";<br>};<br><br>true;<br><br></div><br></div><div class="gmail_extra">Any idea what I might have done wrong?<br></div><div class="gmail_extra"><br></div></div>