有没有办法将 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
}