Skip to content

Instantly share code, notes, and snippets.

@lucas1 lucas1/gist:1216759
Created Sep 14, 2011

Embed
What would you like to do?
Exemplo
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
You can’t perform that action at this time.