PictureSelector icon indicating copy to clipboard operation
PictureSelector copied to clipboard

请问应该如何构建一个OkHttp可以直接上传的file

Open canhuah opened this issue 3 years ago • 2 comments

Current use version?

当前使用的版本是多少?

  implementation 'io.github.lucksiege:pictureselector:v3.0.9'

Describe the problem or provide an error log?

描述问题或提供错误log?

看了文档之后对各种path也是有点懵逼;在安卓各个版本上上传图片到服务器, 应该如何构建一个OkHttp可以直接上传的file呢?

有演示demo吗

canhuah avatar May 07 '22 09:05 canhuah

推荐使用Net, OkHttp太复杂, 而path用来创建File对象即可

scopeDialog {
  Post<String>("upload"){
      param("file", File(path))
  }.await()
}

你这个问题和当前库没什么关系, 别打扰作者关闭问题吧

liangjingkanji avatar May 13 '22 08:05 liangjingkanji

别乱提和这个库无关的问题,你应该先学习下okhtpp文件上传的用法

Tangyongh avatar Aug 02 '22 10:08 Tangyongh