The following worked for me. I am not reading the file contents. I am passing the uploaded path to another script later on.
my $path = $miffile->asset->path; # This is correct for Mojo::Asset::File
my $tfile = File::Temp->new;
if (! $miffile->asset->is_file) { # It's really a Mojo::Asset::Memory
$miffile->move_to($tfile->filename); # Convert to file.
$c->app->log->info("New File : ".$tfile->filename);
$path = $tfile->filename; # This is the path I want now.
}
my $size = $miffile->size;
my $name = $miffile->filename;
# Execute the external command :
run3 ['myLint', $path ], \$in, \$out, \$err;
I will try to clean it up as you suggest. Thanks for the help and most importantly for Mojolicious.
Nicky