{"record":{"id":"84263a3f82288c70","repo":"AlistGo/alist","slug":"unsupported-meta-format-s","errorCode":null,"errorMessage":"unsupported meta_format: %s","messagePattern":"unsupported meta_format: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/chunker/util.go","lineNumber":36,"sourceCode":"\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\n}\n\nfunc (d *Chunker) configuredRemotePaths() []string {\n\tseen := map[string]struct{}{}\n\tpaths := make([]string, 0, 1)\n\taddPath := func(p string) {\n\t\tp = strings.TrimSpace(p)\n\t\tif p == \"\" {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/chunker/util.go#L18-L54","documentation":"Configuration validation error from Chunker.validateOptions, called during storage initialization. The meta_format option controls how chunk metadata sidecar files are serialized; only simplejson (JSON metadata files) and none (no metadata, chunk-name-only reconstruction) are implemented. Any other value is rejected before the storage comes online.","triggerScenarios":"Creating or updating a Chunker storage with meta_format set to anything other than exactly \"simplejson\" or \"none\" — e.g. \"json\", \"simple-json\", \"SimpleJson\", or an empty string.","commonSituations":"Hand-editing the driver addition JSON; guessing option names from other drivers; case or spelling mistakes; upgrading from a fork that supported a different meta format value.","solutions":["Set meta_format to \"simplejson\" (or \"none\" if no metadata files are wanted) exactly, lowercase, no extra whitespace","If metadata sidecars are desired, prefer simplejson since hash_type other than none requires it"],"exampleFix":"// before\n\"meta_format\": \"json\"\n\n// after\n\"meta_format\": \"simplejson\"","handlingStrategy":"validation","validationCode":"var validMetaFormats = map[string]bool{\"simplejson\": true, \"none\": true}\n\nif !validMetaFormats[strings.TrimSpace(cfg.MetaFormat)] {\n    return fmt.Errorf(\"reject config before init: bad meta_format %q\", cfg.MetaFormat)\n}","typeGuard":"func isValidMetaFormat(v string) bool {\n    switch v {\n    case \"simplejson\", \"none\":\n        return true\n    }\n    return false\n}","tryCatchPattern":"if err := storage.Init(ctx); err != nil {\n    if strings.Contains(err.Error(), \"unsupported meta_format\") {\n        // fix the field and re-init once, then give up\n        cfg.MetaFormat = \"simplejson\"\n    }\n}","preventionTips":["Offer meta_format as a dropdown limited to simplejson/none in UI wrappers","Trim whitespace before comparing option values","Document allowed values next to the config field"],"tags":["alist","chunker","configuration","validation"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}