Skip to content

Media type detection not working #17

Description

@XInTheDark

Currently only images are detected correctly. Video formats (like .mov) or plain text (.txt) documents are erroneously rejected.

Steps to reproduce:

  1. let buffer = fs.readFileSync("path/to/any/mov or txt file")
  2. pass buffer to the API as a file upload

The API will return an error saying "Error: Please provide a valid file format that is accepted by Gemini. Learn more about valid formats here: https://ai.google.dev/gemini-api/docs/prompting_with_media?lang=node#supported_file_formats".

Expected behaviour: The API should accept all these video and plaintext formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions