This commit is contained in:
landaiqing 2023-12-27 23:59:13 +08:00
parent 7b1edd9d07
commit 72497c9ecf

View File

@ -70,13 +70,13 @@ public class AttachmentController {
if (config1==null){
bytes1= "没有该Config!".getBytes();
headers.setContentType(MediaType.APPLICATION_JSON);
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.NOT_FOUND);
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.OK);
}
Attachment attachment =attachmentService.selectAttachment(Long.valueOf(config1.getValue()));
if (attachment==null){
bytes1= "没有该Attachment!".getBytes();
headers.setContentType(MediaType.APPLICATION_JSON);
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.NOT_FOUND);
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.OK);
}
String fileUrl=attachment.getPath()+attachment.getFileName()+attachment.getSuffix();
out.println(fileUrl);