Fix FileImage
This commit is contained in:
@@ -5,6 +5,6 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public final class FileConstants {
|
||||
|
||||
public static final String FILE_API_PREFIX = "/file";
|
||||
public static final String FILE_API_PREFIX = "/api/file";
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,11 @@ public class FileController {
|
||||
}
|
||||
|
||||
@GetMapping(FILE_API_PREFIX + "/{resourceId}")
|
||||
public ResponseEntity<Resource> getFileApi(@PathVariable String resourceId) {
|
||||
return ResponseEntity.ok(fileService.getFileAsResource(resourceId));
|
||||
}
|
||||
|
||||
@GetMapping("/file/{resourceId}")
|
||||
public ResponseEntity<Resource> getFile(@PathVariable String resourceId) {
|
||||
return ResponseEntity.ok(fileService.getFileAsResource(resourceId));
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ $(document).ready(function () {
|
||||
let editor
|
||||
ClassicEditor.create(document.querySelector('#editor'), {
|
||||
ckfinder: {
|
||||
uploadUrl: '/file'
|
||||
uploadUrl: '/api/file'
|
||||
}}).then(newEditor => {
|
||||
editor = newEditor;
|
||||
}).catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user