refactor(用例管理): 获取转换文件的权限
This commit is contained in:
parent
8444bb920a
commit
c567ee5bb7
|
@ -51,7 +51,7 @@ public class MsFileUtils {
|
||||||
if (file != null && file.getSize() > 0) {
|
if (file != null && file.getSize() > 0) {
|
||||||
try (InputStream ins = file.getInputStream()) {
|
try (InputStream ins = file.getInputStream()) {
|
||||||
validateFileName(file.getOriginalFilename());
|
validateFileName(file.getOriginalFilename());
|
||||||
File toFile = new File(Objects.requireNonNull(file.getOriginalFilename()));
|
File toFile = new File(FileUtils.getTempDirectoryPath()+"/"+Objects.requireNonNull(file.getOriginalFilename()));
|
||||||
inputStreamToFile(ins, toFile);
|
inputStreamToFile(ins, toFile);
|
||||||
return toFile;
|
return toFile;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue