【问题标题】:Nativescript send image post httpclientNativescript 发送图片发布 httpclient
【发布时间】:2018-02-12 12:23:34
【问题描述】:

我应该通过 nativescript-image-picker 插件发送选定的图像,但我不明白该怎么做。 我正在使用 HttpClient 并且我已插入标题 “Content-Type”:“multipart / form-data”。 图像已经保存在设备上,因为我是从图库中选择它,所以我想避免再次保存它。 你能解释一下怎么做吗? 我不会使用 nativescript-backgrund-http 插件。

提前致谢

【问题讨论】:

  • 为什么不通过 base64 字符串发布呢?做起来很简单
  • 很遗憾我无法访问后端
  • 所以服务器需要分段上传?
  • 是的,我也不知道怎么实现这个东西
  • 是的,我也不知道怎么实现这个东西

标签: image file post httpclient nativescript


【解决方案1】:

好的。正如其他人建议的那样,我使用 nativescript-background-http 插件解决了问题。 目前我还没有找到其他解决方案。我希望他们通过在 HttpClient 中实现它来尽早解决这个问题。 谢谢大家。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-25
    • 1970-01-01
    • 1970-01-01
    • 2012-07-14
    • 1970-01-01
    相关资源
    最近更新 更多