jenkinsci / minio-plugin

Repository for the Minio Jenkins plugin
https://plugins.jenkins.io/minio/
MIT License
10 stars 12 forks source link

Files.probeContentType(path) always return null #178

Open jinyulei0710 opened 1 year ago

jinyulei0710 commented 1 year ago

Jenkins and plugins versions report

Environment ```text 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.