简体   繁体   English

Java / Javascript读取内容-处置文件内容

[英]Java/Javascript read content-disposition file content

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

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. 如果您使用非浏览器客户端(Java,curl,wget ...)并执行GET请求,那么您可以做任何您想做的事情。

(I guess this means your question isn't sufficiently specific) (我想这意味着您的问题不够具体)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM