I think what I would do in your case the following:
* Capture the filestream and post it to the server
* On the server capture the stream and write it out somewhere in a temp location with a non-accessible name or in a DB
* Have another request that allows you to download that same binary content to a local file
* That request should return a URL where the file/content can be picked up (a URL) (in ASP.NET it'll be like Response.DownloadFile() or MVC FileResult)
* On the client capture the URL then use `location.href=url` to navigate there which should give you to the dl dialog
This gives you a download dialog and also a file name (determined by the server), but you can't control the location of the save operation.
You can create a file service server class that can simplify this stuff by managing the ID generation, storage and cleanup for you.
+++ Rick ---
>Hi everybody,
>
>I'm working on a User Story that has the following requirement: when I click on a button, the Save As dialog should popup and when the user selected a location, a file should be generated (tab delimited file) and saved in that location.
>
>I did a quick google search and I don't see as what I am supposed to implement. I'm using angularJS for front-end development and ASP.NET MVC for server side development.
>
>Thanks in advance.
>
>In other words, I have the following few VFP lines and I need to re-create that functionality from the browser:
>
>lcFile = PUTFILE("Name the RGIS Validation file to export to.","RGIS_Validation_" + ;
> DTOC(DATE(), 1) + ".txt", "txt,dat")
> if ! empty(lcFile)
> COPY TO (lcFile) DELIMITED WITH TAB
> MESSAGEBOX('RGIS Validation file created.', 0, 'Tallyman Notification')
> endif