File uploads are retrieved from $self->req->uploads or
$self->req->upload('foo').https://metacpan.org/pod/Mojo::Message#uploads On Fri, May 29, 2015 at 1:06 AM, Pavel Serikov <[email protected]> wrote: > Great, it works, thank you :) > > But how to access params if they are files? > > E.g. i'm sending such hash: > > my %hash = ( > city => "Rostov-on-Don", > model => {file => "stick.stl"}, > image => {file => "test.jpg"}, > promo => "TEST", > ); > > And *$self->req->params->names* will show only *[city, promo]*. > > > пятница, 29 мая 2015 г., 3:58:12 UTC+4 пользователь Dan Book написал: >> >> That Wiki page is outdated, you now access param names by: my $params = >> $self->req->params->names; (returns an arrayref) >> >> From Mojolicious or Mojolicious::Lite works the same. >> >> On Thu, May 28, 2015 at 7:45 PM, Pavel Serikov <[email protected]> >> wrote: >> >>> Hello everyone, >>> >>> Is it possible to get all POST params im Mojolicious::Lite >>> <https://metacpan.org/pod/Mojolicious::Lite> like in Mojolicious >>> <https://metacpan.org/pod/Mojolicious>? Like this: >>> >>> my $param = $self->req->params->to_hash; >>> >>> I tried this way <https://github.com/kraih/mojo/wiki/Request-data>: >>> >>> my @params = $self->param; >>> >>> But Dumper show me an empty array despite I can access each param via >>> $self->param("<param_name>") >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Mojolicious" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/mojolicious. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
