{"record":{"id":"fc6ac6356d5d8791","repo":"AlistGo/alist","slug":"invalid-block-size-from-prepare","errorCode":null,"errorMessage":"invalid block size from prepare","messagePattern":"invalid block size from prepare","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/doubao_new/driver.go","lineNumber":230,"sourceCode":"\t\treturn errors.New(\"missing object token\")\n\t}\n\treturn d.removeObj(ctx, []string{token})\n}\n\nfunc (d *DoubaoNew) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) (model.Obj, error) {\n\tif file == nil {\n\t\treturn nil, errors.New(\"nil file\")\n\t}\n\tif file.GetSize() <= 0 {\n\t\treturn nil, errors.New(\"invalid file size\")\n\t}\n\n\tuploadPrep, err := d.prepareUpload(ctx, file.GetName(), file.GetSize(), dstDir.GetID())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif uploadPrep.BlockSize <= 0 {\n\t\treturn nil, errors.New(\"invalid block size from prepare\")\n\t}\n\n\ttmpFile, err := file.CacheFullInTempFile()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer tmpFile.Close()\n\n\tblockSize := uploadPrep.BlockSize\n\ttotalSize := file.GetSize()\n\tnumBlocks := int((totalSize + blockSize - 1) / blockSize)\n\tblocks := make([]UploadBlock, 0, numBlocks)\n\tblockMeta := make(map[int]UploadBlock, numBlocks)\n\n\tfor seq := 0; seq < numBlocks; seq++ {\n\t\toffset := int64(seq) * blockSize\n\t\tlength := blockSize\n\t\tif remain := totalSize - offset; remain < length {","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/doubao_new/driver.go#L212-L248","documentation":"Error \"invalid block size from prepare\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/doubao_new/driver.go:230 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"}