Skip to content

无需自定义MIME #3

Description

@sonichy

MIME未自定义就不能直接打开,而是下载(例如:你就没有定义视频),那么多MIME你也定义不过来,其实有现成的API:
String mime = URLConnection.getFileNameMap().getContentTypeFor(file.getCanonicalPath());
https://github.com/gpfduoduo/HttpServerOnAndroid/blob/master/app/src/main/java/com/guo/duoduo/httpserver/http/FileBrowseHandler.java#L129

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