Various improvements

This commit is contained in:
Stefan Hardegger
2025-08-21 13:55:38 +02:00
parent 35a5825e76
commit a660056003
11 changed files with 829 additions and 55 deletions

View File

@@ -32,6 +32,7 @@ public class FileController {
private String getCurrentLibraryId() {
String libraryId = libraryService.getCurrentLibraryId();
System.out.println("FileController - Current Library ID: " + libraryId);
return libraryId != null ? libraryId : "default";
}
@@ -44,7 +45,10 @@ public class FileController {
response.put("message", "Cover uploaded successfully");
response.put("path", imagePath);
String currentLibraryId = getCurrentLibraryId();
response.put("url", "/api/files/images/" + currentLibraryId + "/" + imagePath);
String imageUrl = "/api/files/images/" + currentLibraryId + "/" + imagePath;
response.put("url", imageUrl);
System.out.println("Upload response - path: " + imagePath + ", url: " + imageUrl);
return ResponseEntity.ok(response);
} catch (IllegalArgumentException e) {