qiniu / qiniu/nodejs-sdk

大文件分片上传 ResumeUploader unexpected file size

Open
#361 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
590
Forks
191
PR merge metrics
No merged PRs in 30d

Description

sdk 版本:"qiniu": "^7.3.1"

上传文件大小:84MB

当前结果:
body:{"error":"unexpected file size"},info:{"status":400,"statusCode":400,"statusMessage":"Bad Request","headers":{"server":"openresty/1.13.6.2","date":"Wed, 03 Jun 2020 22:46:36 GMT","content-type":"application/json","content-length":"32","connection":"keep-alive","access-control-allow-headers":"X-File-Name, X-File-Type, X-File-Size","access-control-allow-methods":"OPTIONS, HEAD, POST","access-control-allow-origin":"*","access-control-expose-headers":"X-Log, X-Reqid","access-control-max-age":"2592000","cache-control":"no-store, no-cache, must-revalidate","pragma":"no-cache","x-content-type-options":"nosniff","x-reqid":"OmsAAAAWd14oKhUW","x-svr":"UP","x-log":"X-Log"},"size":32,"aborted":false,"rt":82,"keepAliveSocket":false,"data":{"error":"unexpected file size"},"requestUrls":["http://up.qiniup.com/mkfile/89128279/key/dGdsL3ZpZGVvLzEzNjE4MDQubXA0/mimeType/dmlkZW8vbXA0/fname/MTM2MTgwNC5tcDQ="],"timing":null,"remoteAddress":"115.238.101.51","remotePort":80,"socketHandledRequests":1,"socketHandledResponses":1}

期望结果:上传成功

其他相关日志:
通过打印 上传文件时progressCallback 回调信息中可以得知:
data大小会比实际文件大小要大,不知道是什么原因导致的。
报错unexpected file size 的好像都会有这个问题

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ResumeUploader entry point and its progressCallback handling. Reproduce the 84MB upload and compare the reported data size with the actual file size, then inspect the request sent to the mkfile endpoint. Done means the upload completes without an "unexpected file size" response and progress data matches the file size.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.