According https://tools.ietf.org/html/rfc2387#section-4 on multipart/related content-disposition header is optional.
Library only grab a file if content-disposition exists.
I think library should be able to handle files without this optional header and save it with a random (based on timestamp for example) filename.