Each time I deploy my application to cloud, I lose the image that I have uploaded.
The message I get:
When I reupload the image again it shows up as usual.
Is it a know system bug that is known?
Each time I deploy my application to cloud, I lose the image that I have uploaded.
The message I get:
When I reupload the image again it shows up as usual.
Is it a know system bug that is known?
Hi @mortozakhan,
I don’t know which cloud you are using, but I bet you are using a stateless container, so each time you deploy your application, all the files in the container are lost (including your uploaded files).
As cuba, by default, uses file storage, you either need to use a different storage implementation (Amazon S3 in case your cloud is Amazon) or config your server to keep your uploaded files between deployments/restarts/etc.
Hope it helps.
Regards,
Peterson.
Hi
Actually it’s not a cloud but at my VPS server (Linux) running on tomcat.
Hi @mortozakhan,
Then you just need to make sure your cuba.fileStorageDir is not cleaned after redeployments. If i’m not mistaken, it is inside tomcat work dir by default. So I suggest you set a value for this property to a different location.
Regards,
Peterson.
Hi
I have created a folder under webapps folder :
/webappsfilestorage/erp/prod/filestorage
updated parameter in app.properties
cuba.fileStorageDir=/webappsfilestorage/erp/prod/filestorage
However, getting the following error:
As an alternative, I have tried here webapps/app-core/work/filestorage
but having the same outcome!
The folders I have created, that look like inaccessible by the application. any suggestions?