简体   繁体   中英

Jersey ReST webservice returning a File

I've found several good examples of how to return a File / OutputStream from a ReSTful Jersey webservice, but it appears that they all ultimately create a File on the file system. My problem is that I don't want to leave these files lingering around on the machine. Is there a way for me to clean-up once the service sends the response to the client without having to have some backend process monitoring the file system for these Files?

您只需要在base64中返回文件,然后进行处理即可。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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