将文件转换为多部分文件
有没有办法将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
}