Skip to content

wrong mimetype when provide headerBytes with m4a file #686

@yoyo930021

Description

@yoyo930021

Code:

static Future<String?> guessMimeType(File file) async {
  final headerBytes =
      (await file.openRead(0, defaultMagicNumbersMaxLength).toList())
          .map((e) => e.toList())
          .flattened
          .toList();

  return lookupMimeType(file.path, headerBytes: headerBytes);
}

When I input m4a file, I will get video/mp4 not audio/mp4.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions