|
@@ -67,8 +67,10 @@ public class UploadTaskService {
|
|
|
|
|
|
//创建临时文件tempFile,并将file读取到tempFile
|
|
|
File tempFile = File.createTempFile("temp", suffix);
|
|
|
- try (InputStream inputStream = file.getInputStream();
|
|
|
- FileOutputStream outputStream = new FileOutputStream(tempFile)) {
|
|
|
+ try (
|
|
|
+ InputStream inputStream = file.getInputStream();
|
|
|
+ FileOutputStream outputStream = new FileOutputStream(tempFile)
|
|
|
+ ) {
|
|
|
IOUtils.copy(inputStream, outputStream); // 将输入流复制到临时文件
|
|
|
}
|
|
|
|