Skip to content

feat: make upload attachment folder configurable#360

Open
icatw wants to merge 1 commit into
inkeep:mainfrom
icatw:fix/configurable-attachment-folder
Open

feat: make upload attachment folder configurable#360
icatw wants to merge 1 commit into
inkeep:mainfrom
icatw:fix/configurable-attachment-folder

Conversation

@icatw

@icatw icatw commented Jun 28, 2026

Copy link
Copy Markdown

Summary

  • Adds content.attachmentFolderPath as project config for upload destinations.
  • Wires /api/upload through the active project config instead of always using the default page-relative folder.
  • Returns markdown-safe src paths relative to the parent document while keeping path as the content-relative stored asset path.
  • Adds schema, JSON schema, field registry, and upload behavior coverage.

Verification

  • bun test packages/core/src/config/field-registry.test.ts packages/core/src/config/schema-jsonschema.test.ts packages/server/src/config/schema.test.ts packages/server/src/api-extension.test.ts
    • 111 pass / 0 fail
  • Real service-level E2E upload with content.attachmentFolderPath: attachments
    • Response included src: "../attachments/screenshot.png"
    • Response included path: "attachments/screenshot.png"
    • New configured asset path existed
    • Old default docs/screenshot.png path did not exist

Verification screenshot:

Configurable attachment folder E2E

Full-repo check note

bun run check is currently blocked on the existing public-mirror baseline: oxlint@1.66.0 panics with called Result::unwrap() on an Err value / SIGABRT. I split the unrelated baseline fixes into a separate PR so this feature PR stays focused.

@CLAassistant

CLAassistant commented Jun 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@icatw icatw force-pushed the fix/configurable-attachment-folder branch from d555fd9 to 5192b58 Compare June 28, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants