Skip to content

Embedded files are always given the MIME type application/octet-stream #409

Description

@jakejackson1

On #330 (feature/pdfa-2-conformance), an embedded file stream's MIME /Subtype is always application/octet-stream, whatever the file is. That covers files from <annotation file="…"> and from SetAssociatedFiles() when no mime is given.

That passes PDF/A-3 (6.8-1 needs a valid type, not the right one). E-invoicing profiles and viewers use the type, though. Factur-X (#368) needs text/xml for its XML, and viewers use the type to choose an icon and a handler.

Expected. Derive the subtype from the file's extension, or from content sniffing (finfo where available), for the same allow-list of types that #375 maps. Fall back to application/octet-stream.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions