Java/Javascript读取内容-处置文件内容 [英] Java/Javascript read content-disposition file content

查看:109
本文介绍了Java/Javascript读取内容-处置文件内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的网站,我需要从URL中获取一些数据,该URL的响应标头包含Content-Disposition属性,该属性迫使我下载文件.我想知道如何在不将文件下载到磁盘的情况下读取文件内容并执行I/O读取操作.
用Java或JavaScript都可以.

For my web site, I need to get some data from an URL whose response headers contains Content-Disposition attribute which forces me to download the file. I would like to know how I can read the content of the file without downloading the file to disk and do I/O to read it.
Doing so in either Java or JavaScript would be fine.

推荐答案

Content-Disposition仅是建议性的.如果您使用非浏览器客户端(Java,curl,wget ...)并执行GET请求,则您可以做任何您想做的事情.

Content-Disposition is just advisory. If you use a non-browser client (Java, curl, wget...) and do a GET request, you can just do whatever you want.

(我想这意味着您的问题不够具体)

(I guess this means your question isn't sufficiently specific)

这篇关于Java/Javascript读取内容-处置文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆