Hi,
I am working on a generator of pdf with flying saucer and i need to have access to a url in order to display an image.
As file resources can not be retrieved by a regular URL from the server i tried to store the image in temporary folder and get the url of this temporary image.
I am not sure of how to achieve that. I tried to use java createTempFile but it doesn’t store the temp file online.
Here is what i tried.
URI uriSchema = new URI(previousImageField.getSingleData(String.class));
File schema = (localStorageService.getFile(uriSchema)
BufferedImage img = ImageIO.read(schema);
File schemaTemp = File.createTempFile("schema",".png");
ImageIO.write(img,"png",schemaTemp);
schemaTemp.deleteOnExit();
schemaTempPath = schemaTemp.getAbsolutePath();
Thanks a lot,
Clement