Guest msp Posted February 18, 2009 Share Posted February 18, 2009 The tag <input type="file" name="somefile"allows reading of a file into a form and will throw up a browser dependent input box that allows navigation on the local computer in order to findand select the file.My question is what is the converse of this? i.e. the same sort of interaction but selecting a location in whcih to save a file?I.e. is there a html or struts tag that be used in a jsp that will do this?Hope that makes sense. Link to comment Share on other sites More sharing options...
jesh Posted February 18, 2009 Share Posted February 18, 2009 You can tell the browser that it should bring up the "Save As..." dialog window if you specify in your response the "content-disposition".In C#, it'd look like this for a PDF: Response.Clear();Response.AppendHeader("content-disposition", "attachment; filename=myfile.pdf");Response.ContentType = "application/pdf";// Write out to the Response...Response.End(); http://www.google.com/search?q=content-dis...tion+attachment Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.