Skip to content

Commit

Permalink
refactor : rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
NameIsUser06 committed Jan 5, 2024
1 parent 14a3121 commit c990aa8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ResponseEntity<Resource> execute(Long fileId, HttpServletRequest httpServ
() -> FileNotFoundException.EXCEPTION
);
Path path = Paths.get(file.getPath());
Resource resource = new UrlResource(path.toUri().toString().replace("///", "//"));
Resource resource = new UrlResource(path.toUri());
String contentType = httpServletRequest.getServletContext().getMimeType(resource.getFile().getAbsolutePath());
return ResponseEntity.ok()
.contentType(MediaType.parseMediaType(contentType))
Expand Down

0 comments on commit c990aa8

Please sign in to comment.