{"record":{"id":"b9aaa43919e1b6d0","repo":"AlistGo/alist","slug":"invalid-file-size-b9aaa4","errorCode":null,"errorMessage":"invalid file size","messagePattern":"invalid file size","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/bitqiu/driver.go","lineNumber":482,"sourceCode":"\n\tvar resource Resource\n\tif err := json.Unmarshal(resp.Data, &resource); err != nil {\n\t\treturn nil, fmt.Errorf(\"parse upload response failed: %w\", err)\n\t}\n\tobj, err := resource.toObject(parentID, parentPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tup(100)\n\treturn obj, nil\n}\n\nfunc (d *BitQiu) uploadFileInChunks(ctx context.Context, tmpFile model.File, size int64, md5sum string, initData UploadInitData, up driver.UpdateProgress) (string, error) {\n\tif d.client == nil {\n\t\treturn \"\", fmt.Errorf(\"client not initialized\")\n\t}\n\tif size <= 0 {\n\t\treturn \"\", fmt.Errorf(\"invalid file size\")\n\t}\n\tbuf := make([]byte, chunkSize)\n\toffset := int64(0)\n\tvar finishedFlag string\n\n\tfor offset < size {\n\t\tchunkLen := chunkSize\n\t\tremaining := size - offset\n\t\tif remaining < chunkLen {\n\t\t\tchunkLen = remaining\n\t\t}\n\n\t\treader := io.NewSectionReader(tmpFile, offset, chunkLen)\n\t\tchunkBuf := buf[:chunkLen]\n\t\tif _, err := io.ReadFull(reader, chunkBuf); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"read chunk failed: %w\", err)\n\t\t}\n","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/bitqiu/driver.go#L464-L500","documentation":"Error \"invalid file size\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/bitqiu/driver.go:482 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}