You might want to look into the "home" method on the application, it can be 
used to find a directory relative to the application's notion of its own 
path.

On Wednesday, June 8, 2016 at 2:16:49 AM UTC-5, 
[email protected] wrote:
>
>
> hi ,
>  
>
> *  i want to know "how to get the directory path dynamically in the 
> broswer for file  upload**s.*
>
>
> *     Under controller folder.  i used this codes*
>
>  package Llogin::Controller::Example;
> use Mojo::Base 'Mojolicious::Controller';
> use Mojo::Upload;
> # This action will render a template
> sub welcome {
>  
> my  $self=shift;
> my @files;
>     for my $file(@{$self->req->uploads('files')}) {
>         my $size = $file->size;
>         my $name =$file->filename;
>         push @files,"$name ($size)";
>         
> $file->move_to("/home/vagrant/Desktop/projects/llogin/lib/Llogin/Controller/.$name");
>         $self->render(text=>"@files");    
>         
>         
>     }
> }
>
> 1;
> *Under Template folder.  i used this codes*
> <html>
> <form action="<%= /Controller/ %>" method="GET" 
> enctype="multipart/form-data">
> <input name="files" type="file" multiple="multiple">
> <button type="submit">upload</button>
> </form>
> </html>
>
> *please i want to know "how to get the file path dynamically in the 
> broswer"*
>
>
>
>

-- 
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 https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to