How to get the file path to upload?

I’m using FileManager to let user select file from local disk, then I will need to upload this file to another service via it’s REST api. I’m planning to use JavaAction to upload this file, which requires the file actual path. How can I get it? I created an entity which inherits from Syetem.FileDocument, but there seems no path attribute in it.  
1 answers


You can use the Java action FiledocumentToFile from community commons and move the file to a temp path and use that custom path for the Rest API input. 


If you have deployed your app to On-prem/Private cloud you can define the path while saving the file document and again this creates two separate files one inside Mendix and another in your file system, Make sure to remove your Mendix object to eliminate disk space consumption on your node. 

Also, Take a look at FTPS Module. This has some extensibility for saving your file to a different path. 

Hope this helps!