FileUploadUtils.extractFilename(MultipartFile)
时间: 2023-11-12 13:29:00 浏览: 40
`FileUploadUtils.extractFilename(MultipartFile)` is a utility method that extracts the original filename of a `MultipartFile`.
A `MultipartFile` is an interface representing the uploaded file received in a multipart request. It provides methods to access the content of the file, such as `getBytes()` and `getInputStream()`.
The `extractFilename()` method takes a `MultipartFile` object as input and returns its original filename as a `String`. It does this by calling the `getOriginalFilename()` method on the `MultipartFile` object. This method returns the original filename of the uploaded file, as provided by the client who uploaded it.
This utility method can be useful when you need to save the uploaded file to disk or perform any other operations that require the original filename.
阅读全文