Created
September 14, 2011 14:46
-
-
Save lucas1/1216759 to your computer and use it in GitHub Desktop.
Exemplo
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
arquivo TT: | |
<form action="[% c.uri_for(c.controller("Nome_do_controller").action_for("Nome_do_action")) %]" method="post" enctype="multipart/form-data"> | |
<input type="file" name="arquivo" /><br /> | |
<input type="submit" value="enviar" /> | |
</form> | |
<br /> | |
arquivo Controller: | |
sub Nome_do_action :Local{ | |
my ( $self, $c ) = @_; | |
# UPLOAD | |
my $arquivo = $c->req->upload('arquivo'); | |
$arquivo->copy_to('/fotos'); | |
$c->res->body('Enviado com sucesso!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment