Leo/Backend #95
@ -56,12 +56,8 @@ public class StorageService {
|
||||
|
||||
public void delete(StorageFile file) throws SecurityException {
|
||||
File f = new File(file.getUrl());
|
||||
//Delete le fichier
|
||||
try{
|
||||
f.delete();
|
||||
} catch (Exception e) {
|
||||
throw new SecurityException();
|
||||
}
|
||||
f.delete();
|
||||
|
||||
//Delete l'entité
|
||||
fileRepo.delete(file);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user