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
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.