Accessing Local Resource (local directory- outside project) in Vaadin Image

How to access the local image file from my hard drive (outside project folder) in the image component (to make an image gallery)? How to write the path of the file? in Vaadin 14.

It only takes either path from the project or URL. In my project users have to upload the images and I want to make gallery that will show the images.

I tried all the below way but didn’t work:


Part of code (tried this way as well):

for(final File file : files)
			final String path = "file:\\\\" + file.getAbsolutePath().replace("\\", "\\\\");;
			final Image img = new Image();

Please Help! Thanks in advance. Or is there any other way to create an image gallery? I just need to access the local file that is outside the project folder.

The problem is solved:

[StackOverFlow - Accessing Local Resource (local directory- outside project) in Vaadin 14/RapidclipseX IMG component]