有什么方法可以将 File 对象转换为 MultiPartFile?这样我就可以将该对象发送到接受MultiPartFile
接口对象的方法?
File myFile = new File("/path/to/the/file.txt")
MultiPartFile ....?
def (MultiPartFile file) {
def is = new BufferedInputStream(file.getInputStream())
//do something interesting with the stream
}