如何使用Java httpclient实现大文件的HTTP Post分块上传? [英] How to implement HTTP Post chunked upload of a big file using java httpclient?

查看:758
本文介绍了如何使用Java httpclient实现大文件的HTTP Post分块上传?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要上传的文件很大,而另一端的服务器确实支持分块上传. 是否有具体示例说明如何做到这一点? 还是有其他一些图书馆可以做到这一点?

I have an enormous file to upload and server on other side does support chunked upload. Is there any example of how exactly to do that? Or there is some other library which do that?

推荐答案

使用HttpURLConnection,只需设置分块传输模式.

Using HttpURLConnection, just set chunked transfer mode.

这篇关于如何使用Java httpclient实现大文件的HTTP Post分块上传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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