Unable to convert LocalFileStorage Path to String

Hi,
I had added multiple storage path in my project but if i try to store the directory path in String i am getting Unable to cast to String. Is there any Way to Assign Storage path to String.

Below Code is added for Multiple storage

Bean
FileStorage storagePath() {
return new LocalFileStorage(“path”, “/home/”);
}

I am getting Path in io.jmix.localfs.LocalFileStorage@19bdfa3e format
but not in a String format

FileStorage fileStorage = fileStorageLocator.getByName(“path”);

Please clarify more details about what you want to achieve.

The method call of FileStorageLocator#getByName returns the concrete instance of FileStorage, not a String.

I want to get path of storage in String similar to below code
String path = Strings.nullToEmpty(environment.getProperty(“server.servlet.context-path”))

If you didn’t specify the path to local FS explicitly, it’s located at ${user.dir}/.jmix/work/filestorage.
See Local File Storage.