Skip to content

Files.probeContentType(path) always return null #178

@jinyulei0710

Description

@jinyulei0710

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

center os 7

Reproduction steps

  1. add a file name a.html
  2. execute upload
  3. Files.probeContentType(path) return null

Expected Results

Files.probeContentType(path) return text/html

Actual Results

Files.probeContentType(path) return null

Anything else?

String filename = filePath.getName();
Path path = Paths.get(filename);

As the path is not the right path of the file,The result is always return null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions