You can find an example of file upload testing here:
https://metacpan.org/pod/Test::Mojo#post_ok
I haven't tested what follows, but in your case (using "file" as the name of the file input field and "/uploadsave" as the url to post) that should be:
my
$upload
= {
file
=> {
file
=>
'/path/to/the/file/to/upload'
}};
$t
->post_ok(
'/uploadsave'
=>
form
=>
$upload
)->status_is(200);
(the first "file" corresponds to the name of the input field, and that will be the name of the parameter at your controller. The second "file" tells the user agent that it should upload the file that follows);
Hope it helps.
BR,