Acceptance cloud file (.ppt) problem (Java.io FileNotFound)

0
        I have a Java Action that fills with some data a powerpoint template  which I put in tmp subdirectory of deployment directory (Initially I put it in the deployment directory with same following behaviour). The end result is A3 Template1, the powerpoint file which is generated based on given A3 Template file.    The problem I have is that in local environment the java action works fine, and it finds the initial template and generates a new one then it downloads it, but when I move it into the acceptance environment it no longer works with the following indication after cloud debugger usage:
asked
2 answers
1

For dynamic file storage use the FileDocument entity (i.e. a specialisation thereof)

For static files you can also use the /resources folder of your project. These files are then part of your deployment package. (Be carefull there though as this can significantly affect the deployment process when using large files).

tmp is only for temporary files (what a surprise :) )

Since there are some modules that also store files in the apps filesystem (e.g. the GlobalSearch for Lucene) it should also be possible to use other locations – however, documentation on this topic is lacking.

regards, Fabian

answered
1

In Mendix cloud (I guess also for private cloud), the tmp directory will be cleared for every deployment.

So, lets say you put the template in your .tmp directory and deploy the template is gone.

You could probably save it in database and retrieve the template.

In your local machine, the .tmp directory is not deleted for every deployment. So that is the reason it works in local.

answered