I have a small PSGI application that takes a load from a form and passes it to another script for processing:
#!/usr/bin/perl use strict; use warnings; use Plack::Request; use HTTPStatusCode; my $app = sub { my $req = Plack::Request->new(shift); my $content; if (keys %{$req->uploads}) { $content = do_something_with_upload($req); } else { $content = display_form(); } return [ HTTPStatusCode->SUCCESS, [ 'Content-type', 'text/html' ], [ $content ], ]; };
The file loads successfully as something like /tmp/Fw8n6j0ICn.txt . The problem is that the processing depends on the file name, as it was at boot.
Is it possible to change the loading of files so that they go to /tmp/Fw8n6j0ICn/original_name.txt ?
source share