如何在Android中使用HttpPost上传图片和视频文件 [英] How to upload Image and Video file using HttpPost in android

查看:644
本文介绍了如何在Android中使用HttpPost上传图片和视频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用HttpPost方法上载图像和视频文件与多个参数,如文件名,说明,高度和宽度。

I need to upload Image and Video File with multiple parameters like File Name, Description , Height and Width using HttpPost method.

谢谢, 建议AP preciated。

Thanks, Suggestion appreciated.

推荐答案

有关上传文件的有效方法是使用HttpPost与多部分/表 -
的multipart /表单文件内容或者存储在内存或临时磁盘上。在两种情况下,用户负责文件内容复制到会话级或持久性存储器作为和如果需要的话。临时存储区将在请求处理结束时清除

使用转寄此上传的文件从Android的一个网站/ HTTP Server后

For uploading a file the efficient way is using HttpPost with multipart/form

Multipart/form The file contents are either stored in memory or temporarily on disk. In either case, the user is responsible for copying file contents to a session-level or persistent store as and if desired. The temporary storages will be cleared at the end of request processing

Refer this Upload Files from Android to a Website/Http Server using Post

这篇关于如何在Android中使用HttpPost上传图片和视频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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