Skip to content

Instantly share code, notes, and snippets.

@Windsooon
Created March 29, 2016 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Windsooon/e547a19660cba8c0cb5c to your computer and use it in GitHub Desktop.
Save Windsooon/e547a19660cba8c0cb5c to your computer and use it in GitHub Desktop.
Qiniu upload
//直传时正常,formData 包含文件仪器其他上传参数
$.ajax({
url: "https://up.qbox.me",
type: "POST",
data: formData,
datatype: "json",
cache: false,
processData: false,
contentType: false,
})
//使用分片上传 返回401错误 error: auth error
$.ajax({
url: "https://up.qbox.me/mkblk/1024",
type: "POST",
data: formData,
datatype: "json",
cache: false,
processData: false,
contentType: "application/octet-stream",
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment