So, basically I have an A.I. based application that does image processing. Now I am programming web application that users will upload their image files, after processing they will be provided with information.
First part of my code uploads image file to Directory named "images". Second part engages with Reading image from the same directory.
But as I researched this sometime can be found bad practice. Could someone please explain me why this is assumed to be bad practice and which way I can replace it with?


List<FileItem> fileItemList = servletFileUpload.parseRequest(request);

'' 'Путь записывается и читается из' '' String path = getServletContext (). GetRealPath ("images");

for(FileItem fileItem: fileItemList){
    fileItem.write(new File(path + "/" + fileItem.getName()));
}

BufferedImage bufferedImage = ImageIO.read(new File(path + "/" + fileItem.getName()));
0
Royal Aliyev