Fix FileImage

This commit is contained in:
MangKyu
2022-02-01 02:07:58 +09:00
parent 17a89aa943
commit d19d3f5d49
3 changed files with 7 additions and 2 deletions

View File

@@ -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";
}

View 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));
}

View File

@@ -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 => {