I would expect the user of a Perspective UI to want a file to be placed in the machine on which the client browser is running. You cannot write from a script to a client browser's local filesystem. (Nor read anything, either.) Browsers don't allow that malware-ish behavior.
There are many reasons a script running in a gateway might want to write into a file in the gateway, but it wouldn't be expected to be accessible to any client.
Sure, if you are uploading, you might expect to save in the gateway. If you want client control over the file name (potentially dangerous!), give them a text field for that. Giving them any option to pick an arbitrary destination folder in the gateway is crazy.
What are you actually trying to do?
The File Upload component creates temporarily files on the gateway when files are uploaded. Their location is deliberately obscured from you - they should be treated as ephemeral unless explicitly saved somewhere by you. That can be a database table with a BLOB column, a specific directory on the filesystem, into an S3 bucket via system.net.httpClient, whatever - it's up to you.
If you ultimately want that export to end up on whatever user agent is actually viewing your Perspective project (web browser, mobile device, workstation session) your only option is system.perspective.download, subject to the restrictions Phil mentioned above. This isn't something we (IA) can work around - it's a fundamental behavior of web browsers that they don't allow you to look at the local filesystem, so all you can do is give the user agent a download link and hope that it will accept downloading your file with the filename you suggested.