Various improvements
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user