[PR #2100] [MERGED] feat: Add support for user uploaded files #1974

Closed
opened 2026-03-02 12:00:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/2100
Author: @MohamedBassem
Created: 11/8/2025
Status: Merged
Merged: 11/8/2025
Merged by: @MohamedBassem

Base: mainHead: claude/karakeep-al-011CUvX24FPQBwqJW9FJQD7X


📝 Commits (4)

  • d005690 feat: add user file upload support for bookmarks
  • 8aa5ef5 fix: ensure fileName is returned and remove edit button for user uploads
  • fa92102 fix asset file name
  • 01d8142 remove filename from attach asset api

📊 Changes

10 files changed (+101 additions, -31 deletions)

View changed files

📝 apps/web/components/dashboard/preview/AttachmentBox.tsx (+59 -26)
📝 apps/web/lib/attachments.tsx (+2 -0)
📝 packages/db/schema.ts (+2 -0)
📝 packages/open-api/karakeep-openapi-spec.json (+11 -0)
📝 packages/open-api/lib/bookmarks.ts (+5 -1)
📝 packages/shared/types/bookmarks.ts (+2 -0)
📝 packages/trpc/lib/attachments.ts (+5 -0)
📝 packages/trpc/models/bookmarks.ts (+1 -0)
📝 packages/trpc/routers/assets.ts (+13 -4)
📝 packages/trpc/routers/bookmarks.ts (+1 -0)

📄 Description

Add a new "user-uploaded" asset type that allows users to upload and attach their own files to bookmarks from the attachment box in the bookmark preview page.

Changes:

  • Add USER_UPLOADED asset type to database schema
  • Add userUploaded to zAssetTypesSchema for type safety
  • Update attachment permissions to allow attaching/detaching user files
  • Add fileName field to asset schema for displaying custom filenames
  • Add "Upload File" button in AttachmentBox component
  • Display actual filename for user-uploaded files
  • Allow any file type for user uploads (respects existing upload limits)
  • Add Upload icon for user-uploaded files

Fixes #284


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/2100 **Author:** [@MohamedBassem](https://github.com/MohamedBassem) **Created:** 11/8/2025 **Status:** ✅ Merged **Merged:** 11/8/2025 **Merged by:** [@MohamedBassem](https://github.com/MohamedBassem) **Base:** `main` ← **Head:** `claude/karakeep-al-011CUvX24FPQBwqJW9FJQD7X` --- ### 📝 Commits (4) - [`d005690`](https://github.com/karakeep-app/karakeep/commit/d005690f5f201a8cfca0443788f12c0faeef2551) feat: add user file upload support for bookmarks - [`8aa5ef5`](https://github.com/karakeep-app/karakeep/commit/8aa5ef520c6fa29a5779e519dc2d52199316f5b3) fix: ensure fileName is returned and remove edit button for user uploads - [`fa92102`](https://github.com/karakeep-app/karakeep/commit/fa92102f21398563470f53b743167bb3779e55c6) fix asset file name - [`01d8142`](https://github.com/karakeep-app/karakeep/commit/01d81428a525285730deb8cd2de65675dea2f6c4) remove filename from attach asset api ### 📊 Changes **10 files changed** (+101 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/components/dashboard/preview/AttachmentBox.tsx` (+59 -26) 📝 `apps/web/lib/attachments.tsx` (+2 -0) 📝 `packages/db/schema.ts` (+2 -0) 📝 `packages/open-api/karakeep-openapi-spec.json` (+11 -0) 📝 `packages/open-api/lib/bookmarks.ts` (+5 -1) 📝 `packages/shared/types/bookmarks.ts` (+2 -0) 📝 `packages/trpc/lib/attachments.ts` (+5 -0) 📝 `packages/trpc/models/bookmarks.ts` (+1 -0) 📝 `packages/trpc/routers/assets.ts` (+13 -4) 📝 `packages/trpc/routers/bookmarks.ts` (+1 -0) </details> ### 📄 Description Add a new "user-uploaded" asset type that allows users to upload and attach their own files to bookmarks from the attachment box in the bookmark preview page. Changes: - Add USER_UPLOADED asset type to database schema - Add userUploaded to zAssetTypesSchema for type safety - Update attachment permissions to allow attaching/detaching user files - Add fileName field to asset schema for displaying custom filenames - Add "Upload File" button in AttachmentBox component - Display actual filename for user-uploaded files - Allow any file type for user uploads (respects existing upload limits) - Add Upload icon for user-uploaded files Fixes #284 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 12:00:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1974
No description provided.