Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Problem with MIME::Parser and filenames

by tangent (Vicar)
on Oct 10, 2017 at 21:40 UTC ( #1201123=note: print w/replies, xml ) Need Help??


in reply to Problem with MIME::Parser and filenames

$parser->decode_headers(1);
I'm not sure if relevant, but from a quick look at the docs for MIME::Parser it says you should not use decode_headers() unless you really know what you are doing. Have you tried commenting out that line?

Replies are listed 'Best First'.
Re^2: Problem with MIME::Parser and filenames
by Laurielounge (Acolyte) on Oct 10, 2017 at 23:12 UTC
    Good idea. Didn't help though... exactly the same outcome.
      FWIW I sent myself a xlsx file with the same name as yours. It came in with the same Content-Type (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) and MIME::Parser saved the attached file correctly. So I don't think Content-Type is the problem. Could it be some type of filename length restriction - try adding something like this to your script:
      system('getconf NAME_MAX ' . $tmpdir);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1201123]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2022-05-23 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (81 votes). Check out past polls.

    Notices?