sync
This commit is contained in:
parent
23103aa3b9
commit
6c9ecf7458
1 changed files with 8 additions and 0 deletions
|
|
@ -89,6 +89,14 @@ public class FileUploadService {
|
|||
|
||||
try {
|
||||
FileUrl fileUrl = parseFileUrl(downloadRequest.fileInfo().getFileUrl());
|
||||
|
||||
try {
|
||||
Files.createDirectories(Paths.get(fileSavingPath));
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException("Failed to create directory " + fileSavingPath, e);
|
||||
}
|
||||
logger.info("working in {}", System.getProperty("user.home"));
|
||||
Path filePath = Paths.get(fileSavingPath, fileUrl.fileName());
|
||||
String downloadUrl = fileUrl.fileUrl();
|
||||
downloadFile(downloadUrl, filePath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue