Skip to main content
This guide shows you how to build a file sharing feature within your collaborative application using CollabKit’s Storage module.

What You’ll Build

  • File upload with drag-and-drop support
  • Filterable file gallery (by type, by user)
  • File deletion
  • Image preview for uploaded images

Prerequisites

  • A CollabKit server running with a room and users created
  • @collab-kit/client installed

Step 1: Set Up the Client

Storage uploads and deletes are editor actions. Viewers can list and open files, but cannot upload or delete files.

Step 2: Upload Files

The Storage module uploads files via HTTP (not WebSocket):

Step 3: Add Drag-and-Drop

Step 4: List and Filter Files

Step 6: Delete Files

Step 7: Filter Buttons

Notify Others with Broadcasts

Since file operations use HTTP (not WebSocket), other users don’t automatically see new uploads. Use broadcasts to notify them:

Next Steps

  • Add file preview modals for images and PDFs
  • Attach files to comments
  • Use stores to track file metadata (tags, descriptions)
  • Set up webhooks to process uploads server-side