I want to use two file storage in my project.
I have defined default file storage in application properties as -
jmix.core.default-file-storage = fs
jmix.localfs.storage-dir = /opt/tomcat/filestorage
I have defined additional file storage in application file as mentioned in documentation
@Bean
FileStorage userfs() {
return new LocalFileStorage("userfs", "/opt/tomcat/userfilestorage");
}
I am getting following problems -
Local Host-
- When i open screen with default file storage it gives error -
NoUniqueBeanDefinitionException: No qualifying bean of type 'io.jmix.core.FileStorage' available: expected single matching bean but found 2: locfs_FileStorage,userfs
- files in additional file storage userfs works properly.
Server-
- Same problem with default file storage
- Uploading files in additional file storage userfs gives error on server one big pink without any info
How can i solve this problem?
Thanks in advance