1
0
forked from PGL/Clyde

Add testing for file uploading and correct minors bugs in service

This commit is contained in:
2024-03-17 19:06:27 +01:00
parent 571d27c230
commit 924faca13f
3 changed files with 108 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ public class StorageService {
String url = this.rootLocation.resolve(Paths.get(Objects.requireNonNull(stringUuid)))
.normalize().toString();
return fileRepo.save(new StorageFile(file.getName(),url, fileType));
return fileRepo.save(new StorageFile(file.getOriginalFilename(),url, fileType));
}
public void delete(StorageFile file) throws SecurityException {