This is My StoreService
@Override
public String store(MultipartFile file) {
String ext = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = UUID.randomUUID().toString().replaceAll("-", "") + ext;
File filePath = new File(BASEPATH, fileName);
/*
* Files filePath=new File(BASEPATH, fileName);
*/ try (FileOutputStream out = new FileOutputStream(fileName)) {
FileCopyUtils.copy(file.getInputStream(), out);
return fileName;
} catch (Exception e) {
e.printStackTrace();
}
return null;
} what changes i need to add her to dipaly the images and store the images
New contributor
Srikar K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.