... and code defined as...Content-Type: application/vnd.openxmlformats-officedocument.spreadshee +tml.sheet; name="Copy of 1501733944381-20170803 Dataload.xlsx" Content-Description: Copy of 1501733944381-20170803 Dataload.xlsx Content-Disposition: attachment; filename="Copy of 1501733944381-20170803 Dataload.xlsx"; size=23847; creation-date="Mon, 09 Oct 2017 12:39:28 GMT"; modification-date="Mon, 09 Oct 2017 12:38:40 GMT" Content-Transfer-Encoding: base64
... and variable $email defined as a full path and filename, I get a file created in /tmp/$emailfilename asmy $emailfile = basename("$email"); my $tmpdir = "/tmp/$emailfile"; mkdir "$tmpdir"; my $parser = MIME::Parser->new(); $parser->decode_headers(1); $parser->output_dir("$tmpdir"); my $message = $parser->parse_open("$email");
Two things. The name is wrong and the suffix is wrong. I can live with the suffix being wrong but it does point to possibly the problem being with the content-type being something MIME::Parser doesn't fully recognise. Anyone come across anything like this? Anyone solve it?Copy of 150173.xls
In reply to Problem with MIME::Parser and filenames by Laurielounge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |