Skip to content

File extension is used to validate file support and to get mime type #17

Description

@cullylarson

In index.js, the file extension is used to determine whether the file is supported by lqip. It is later used to get the mime type of the file.

The problem is that you can't use lqip to process files without extensions. I'm running into this issue dealing with uploaded files processed by formidable. Yes, I could rename the file first, but if the file is on a network share it may be necessary to copy and unlink in order to rename a file.

A couple potential solutions are (1) get the mime type from the file itself, or (2) allow passing the mime type as a parameter to lqip.base64.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions