这是indexloc提供的服务,不要输入任何密码
Skip to content

documents provider: mime type map fails with .JPG #721

@chrysn

Description

@chrysn

The mime type for .JPG files exported to the Storage Access Framework via the documents provider is the fallback application/octet-stream; thus, image viewers won't open it.

Given that file extensions are usually case insensitive and the library appears to only recognize lower-case variants (tried .html, .doc and .txt), and that digital cameras often store uppercase letters, I suggest that lowercasing the extension before here as a mitigation.

(I can't tell whether there might be better ways than using webkit's mimetypemap (maybe libmagic?) -- but lowercasing would mitigate the immediate issue).

Thank you for maintaining termux and the documents provider; it makes dealing with the android file system limitations much better!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions