LandT
LandT
  • 发布:2018-01-08 18:22
  • 更新:2018-07-20 17:07
  • 阅读:1679

ios下上传七牛云报400

分类:HTML5+

说来奇怪,之前写的代码今天就出问题了,

功能就是选择 拍照 或 相册 拿图片 然后上传到七牛云

上传函数 用的是一个 安卓是没啥问题的 ios 选择相册 上传也是没问题的 唯独 就是拍照会有问题。

不管是 拍照还是相册 拿到图片都会压缩,二者都提示压缩成功,生成的文件只是 后缀大小写有区分(拍照为小写,从相册拿是大写)

拍照 file:///var/mobile/Containers/Data/Application/5A984529-8042-4B2E-B2D3-2307E14372CA/Documents/Pandora/apps/HBuilder/www/pages/doc/201818181143.png

相册 file:///var/mobile/Containers/Data/Application/5A984529-8042-4B2E-B2D3-2307E14372CA/Documents/Pandora/apps/HBuilder/www/pages/doc/20181818955.PNG

七牛报错 信息

{  

  "url": "http://upload.qiniu.com/",  
  "options": {  
    "method": "POST"  
  },  
  "uploadedSize": 0,  
  "totalSize": 587,  
  "responseText": "",  
  "method": "POST",  
  "timeout": 120,  
  "retry": 3,  
  "retryInterval": 30,  
  "priority": 1,  
  "eventHandlers": {  
    "statechanged": {  
      "type": "statechanged",  
      "handles": [  
        null  
      ],  
      "capture": false  
    }  
  },  
  "__requestHeaders__": {},  
  "__responseHeaders__": {  
    "Content-Type": "application/json",  
    "Access-Control-Allow-Origin": "*",  
    "Pragma": "no-cache",  
    "X-Via": "vdn-tj-tel-1-1",  
    "X-Svr": "UP",  
    "Server": "openresty",  
    "Access-Control-Allow-Methods": "OPTIONS, HEAD, POST",  
    "Access-Control-Expose-Headers": "X-Log, X-Reqid",  
    "Access-Control-Max-Age": "2592000",  
    "Access-Control-Allow-Headers": "X-File-Name, X-File-Type, X-File-Size",  
    "X-Reqid": "tEgAAPft7qsJzQcV",  
    "Cache-Control": "no-store, no-cache, must-revalidate",  
    "Date": "Mon, 08 Jan 2018 09:54:01 GMT",  
    "X-Log": "body;UP/400",  
    "Content-Length": "46",  
    "Connection": "keep-alive",  
    "X-Content-Type-Options": "nosniff"  
  },  
  "__noParseResponseHeader__": null,  
  "__cacheReponseHeaders__": {},  
  "state": 4  
}
2018-01-08 18:22 负责人:无 分享
已邀请:
飞翔的茶叶

飞翔的茶叶 - 一直在路上

换个URL

plus.uploader.createUpload('http://up-z2.qiniup.com', {  
                        method: "POST"  
                    },  
……

该问题目前已经被锁定, 无法添加新回复