我如何选择我想要保存下载文件的位置? [英] How can I choose the location where I want to save downloaded files?
本文介绍了我如何选择我想要保存下载文件的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谢谢。
解决方案
response.setHeader(Content-disposition,attachment; filename = book.csv);
response.setContentType(application / vnd.ms-excel);
response.outputStream<< test.writeToString();
I have a Grail application under Groovy. I export an Excel file. I can export a file if I mention the file location in the code, but I want to keep the user choose file location on his PC. What is HTML or JavaScript to do this? Do you have any code to help me?
Thanks.
解决方案
response.setHeader("Content-disposition", "attachment; filename= book.csv" );
response.setContentType("application/vnd.ms-excel");
response.outputStream << test.writeToString();
这篇关于我如何选择我想要保存下载文件的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文