When you run your project locally, the files are saved in %PROJECT_DEPLOYMENT_DIR%/data/files. The directory is probably the same in the cloud.
There are however two problems:
1) You might not have write access to this directory, see: https://world.mendix.com/display/refguide3/Java+in+the+Cloud
2) I believe Mendix will not normally see the files you add in this directory, since there is no associated FileDocument object.
The solution to both these problems would be to write a Java action which uses Mendix functionality to create a FileDocument object, attach the file to the object and commit the object and the file.