简体   繁体   English

是否有必要在通过另一个REST API发送之前从URL保存下载的文件?

[英]Is it necessary to save a downloaded file from an URL before sending it through another REST API?

I have a problem regarding handling files using java. 我有一个使用java处理文件的问题。 In my program i'll have to download a certain file from a URL (this works fine), but then i need to send the same file via a REST API to save it into a cloud storage. 在我的程序中,我将不得不从URL下载某个文件(这很好),但是我需要通过REST API发送相同的文件以将其保存到云存储中。

My question now is whether it's necessary to save the downloaded file locally before sending it via the REST API? 现在的问题是,在通过REST API发送之前是否有必要在本地保存下载的文件?

Ask from yourself - is it OK to loose the file when something happens to your program and it restarts. 问自己 - 当你的程序出现问题并重新启动时,可以放松文件。 When saving it locally (in temporary location) then you can continue processing it after your program is again up and running. 在本地保存(在临时位置)时,您可以在程序再次启动并运行后继续处理它。

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

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