Skip to content

SUPPORTED_EXTENSIONS default omits parseable .json #418

Description

@Frankie-Xu

Problem

Worker format_router.SUPPORTED_FILE_TYPES and README list .json as supported (JsonParseAdapter exists). The API admission default in packages/shared-python/shared/core/config/storage.py does not:

SUPPORTED_EXTENSIONS: str = Field(
    default=".doc,.docx,.pdf,.txt,.xls,.xlsx,.pptx,.jpg,.jpeg,.png,.md,.html,.htm",
)

A self-hosted install that does not override SUPPORTED_EXTENSIONS therefore rejects .json at the API even though the worker can parse it.

.html / .htm are already in both the worker router and the storage default. .json is the odd one out.

Why this is not a drive-by patch

Changing the storage default is a public admission-behavior change. apps/api/.env.example / apps/worker/.env.example currently also omit .json (after dropping the unsupported .csv advertisement in a separate PR). Adding .json to the default should be an explicit maintainer decision, not bundled with example cleanup.

Suggested options

  1. Add .json to the SUPPORTED_EXTENSIONS default and both .env.example files so out-of-the-box matches worker/README.
  2. Keep the default as-is and document .json as opt-in via SUPPORTED_EXTENSIONS.

I am not implementing either here. Asking which contract you want.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions