{"record":{"id":"c3a0811b396f3641","repo":"AlistGo/alist","slug":"remote-path-is-required","errorCode":null,"errorMessage":"remote_path is required","messagePattern":"remote_path is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/chunker/util.go","lineNumber":28,"sourceCode":"\t\"path\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/alist-org/alist/v3/internal/errs\"\n\t\"github.com/alist-org/alist/v3/internal/fs\"\n\t\"github.com/alist-org/alist/v3/internal/model\"\n\t\"github.com/alist-org/alist/v3/internal/op\"\n\t\"github.com/alist-org/alist/v3/internal/stream\"\n\t\"github.com/alist-org/alist/v3/pkg/http_range\"\n\t\"github.com/alist-org/alist/v3/pkg/utils\"\n)\n\nfunc (d *Chunker) validateOptions() error {\n\tif strings.TrimSpace(d.RemotePath) == \"\" {\n\t\treturn errors.New(\"remote_path is required\")\n\t}\n\tif d.ChunkSize <= 0 {\n\t\treturn errors.New(\"chunk_size must be positive\")\n\t}\n\tswitch d.MetaFormat {\n\tcase \"simplejson\", \"none\":\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported meta_format: %s\", d.MetaFormat)\n\t}\n\tswitch d.HashType {\n\tcase \"none\", \"md5\", \"sha1\":\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported hash_type: %s\", d.HashType)\n\t}\n\tif d.MetaFormat == \"none\" && d.HashType != \"none\" {\n\t\treturn fmt.Errorf(\"hash_type %q requires meta_format=simplejson\", d.HashType)\n\t}\n\treturn nil","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/chunker/util.go#L10-L46","documentation":"Returned by Chunker.validateOptions() when the storage's remote_path option is empty or whitespace-only. The chunker driver stores file chunks at a remote path on another alist storage; without it there is nowhere to place chunks, so initialization fails fast.","triggerScenarios":"Creating or updating a Chunker storage whose RemotePath field is blank; loading a previously saved storage where remote_path was never set (e.g. migrated config).","commonSituations":"New storage created without filling remote_path; config edited via API that clears the field; spaces-only value pasted accidentally.","solutions":["Set remote_path in the storage addition to an absolute path on a mounted storage, e.g. /local/chunker-store","Ensure the referenced mount path exists and the underlying storage is healthy","Save and reload the storage so validateOptions passes"],"exampleFix":"// before\naddition: { remote_path: \"\" }\n// after\naddition: { remote_path: \"/local-drive/chunker-store\" }","handlingStrategy":"validation","validationCode":"func validChunkerOpts(remotePath string) bool { return strings.TrimSpace(remotePath) != \"\" }","typeGuard":null,"tryCatchPattern":"if err := d.validateOptions(); err != nil && strings.Contains(err.Error(), \"remote_path is required\") { /* prompt user for remote_path, then re-save storage */ }","preventionTips":["Make remote_path a required field in any config UI/template","Test storages with validateOptions right after creation","Never save a Chunker storage with blank remote_path"],"tags":["chunker","config","validation"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}