Skip to content

Media Attachments

The widget lets users attach images, audio recordings, and video recordings to comments.

How It Works

When composing a comment, three buttons appear in the input area:

ButtonTypeTriggers
PaperclipImageMulti-select file picker
MicAudioIn-browser microphone recorder
Video cameraVideoIn-browser camera recorder

Attachments are uploaded immediately when selected. Up to 5 attachments per comment by default (configurable via Environment Config).

Attachment Types

Images

  • Accepted formats: JPEG, PNG, GIF, WebP
  • Displayed as thumbnail previews while composing
  • Rendered inline in comments as clickable thumbnails
  • Lightbox — click any image to view full size with prev/next navigation (arrow keys and on-screen arrows)

Audio

  • Recorded in-browser via the microphone
  • Displayed as a compact WhatsApp-style waveform player
  • Play/pause, scrub, and duration shown inline

Video

  • Recorded in-browser via the camera
  • Displayed as a rectangular inline preview with a play button
  • Click the expand icon to open fullscreen overlay with native controls

Attachment Previews

Before submitting a comment, attachments appear as previews below the input. Each preview has an X button to remove it before sending.

File Size Limits

The default limit is 10 MB per file. This is configurable per environment — see Environment Config.

Files exceeding the limit are rejected with a 413 error from the server.

Upload Authentication

Uploads use the same credentials as the WebSocket connection (pk_ + user JWT). There is no extra setup required when using <pulse-widget> — it handles uploads transparently.

For programmatic uploads via the Client SDK, see client.uploadFile().

Clicking a posted image opens the lightbox:

  • Full-size image centered in a dark overlay
  • Prev / Next arrows when multiple images are in the comment
  • Keyboard navigation — left/right arrow keys cycle through images
  • Click outside or press Escape to close

Video Fullscreen

Clicking the expand button on a video attachment opens a fullscreen overlay:

  • Native HTML5 video controls (play, pause, seek, volume, fullscreen)
  • Click outside the player or press Escape to close

Disabling Attachments

Individual media types can be disabled per environment from the Admin Panel. Disabled buttons are hidden from the widget UI automatically. See Environment Config for details.

Upload API

To upload files from your own backend, use the Upload REST API.

Pulse Collaboration SDK