Configurar rutas personalizadas para la carpeta upload y logs en un Enterprise project

30 Aug '17, 12:31 AM
1,614 Views
No Forum Badges

Cómo puedo configurar rutas personalizadas para los archivos que subo y los archivos de log generados en un Enterprise project?

-----------------------------------------------------------------------------------------------------------------

How can I set a custom path to uploaded files and generated log files from an Enterprise project?

 
x 0
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Hola Ricardo,
Puedes seguir los siguentes pasos:
Crear la carpeta WebContent en el proyecto Enterprise
Dentro de la carpeta crear una carpeta con el nombre del proyecto enterprise seguido de _ROOT.jar pe: testEnterprise_ROOT.jar
Dentro de la carpeta xxx_ROOT.jar crear una carpeta con el nombre conf
Dentro de la carpeta conf crear un archivo llamado AppConfig.properties
En el archivo AppConfig.properties crear las rutas personalizadas
-uploadDirectory=/miUpload/uploads
-uploadDirectoryIsAbsolute=true
-logDirectory=/miLog/logs
-logDirectoryIsAbsolute=true
Para comprobar crear una entidad virtual con duración de aplicación, con un campo blob
Crear una página con un form y un campo empatado a la entidad y atributo blob guardar y revisar si se guardaron los archivos en la ruta personalizada.

------------------------------------------------------------------------------------------------------

Follow the next steps:
Create a new folder and named WebContent into the Enterprise project
Into the WebContent folder create a new folder and named its as enterprise name followed with _ROOT.jar pe:testEnterprise_ROOT.jar
Into the xxx_ROOT.jar create a new folder and named its as conf
Into the conf folder create a new file named AppConfig.properties
Into the AppConfig.properties create your paths:
- uploadDirectory=/myUpload/uploads
- uploadDirectoryIsAbsolute=true
- logDirectory=/miLog/logs
- logDirectoryIsAbsolute=true
To try you can create a new virtual entity with application duration, and add a blob attribute.
Create a new page with a form component and add a field blob add a create component and save the data, then you can check if the files were saved in the new path.

   
x 0
Answer at this question and get points!