Upload a file in a specific path

hi, I want to upload a file to mendix db into a specific folder and use that path in an external API which only takes path of a file(not stream) in a grid i am planning to upload a file and if the path is known then this can be used as constant to pass to the API This is coming from the fact that i used to use filedocumentcontentasfile method in Core and in Mx this method is removed.
1 answers

We're moving away from using local filesystems to store files, which is the reason we've deprecated the getFileDocumentAsFile method. If you do require access to a filedescriptor (as opposed to an inputstream), we advise you to create a temporary file using Java and copying the FileDocument to that.