changed jdk on 25 springBoot on 3.5.6 and fix code

This commit is contained in:
SlimusMinus
2026-09-30 00:27:10 +03:00
parent 1efb67824f
commit 015b68d96d
19 changed files with 2226 additions and 71 deletions

View File

@@ -34,10 +34,12 @@ public class FileStorageController {
return fileStorageService.downloadFile(key);
}
@DeleteMapping("/{objectName}")
@DeleteMapping("/{*objectName}")
public ResponseEntity<Void> deleteFile(@PathVariable String objectName) {
log.info("deleteFile {}", objectName);
fileStorageService.deleteFile(objectName);
// objectName может прийти как "/avatars/cf80aebe-...jpg" — обрежем ведущий слэш
String key = objectName.startsWith("/") ? objectName.substring(1) : objectName;
fileStorageService.deleteFileAsCurrentUser(key);
return ResponseEntity.noContent().build();
}
}