How can i read the "cuba.fileStorageDir" Value

Hi

How can i read the “cuba.fileStorageDir” Value from app.properties for use
in my Service?

Kind regards
Frank

Hi Frank,

You can get it on the middleware (in the core module) this way:

String dir = AppContext.getProperty("cuba.fileStorageDir");

Or better via ServerConfig interface:


@Inject
private ServerConfig serverConfig;
// ...
String dir = serverConfig.getFileStorageDir();

Hey Konstantin,

thank´s! You made my day!