Dears,
in my adf application I created folder with name img and I want to save the uploaded images into this folder so I wrote the below code :
| | UploadedFile myFile = (UploadedFile) valueChangeEvent.getNewValue(); |
| | String imageDirPath = "/img/"; |
| | |
| | InputStream inputStream = myFile.getInputStream(); |
| | BufferedImage input = ImageIO.read(inputStream); |
| | |
| | File outputFile = new File(imageDirPath +var+".jpg"); |
| | ImageIO.write(input,"PNG",outputFile); |
I get error where it can't find the path of my folder img but when I write the path like this D:/ADF/MyApp/ViewController/public_html/img/ it work fine. So please advise what is the error in this line String imageDirPath = "/img/";