TheOpenPresenter
  • Introduction
    • Welcome
    • Motivation & Challenges
    • System Architecture
    • Terminologies
    • Server Communication
    • Project Topology
  • Development
    • Quickstart
    • Static files
    • Media Storage
  • Plugins
    • Introduction
    • Official Plugins
      • Google Slides
      • Lyrics Presenter
        • Lyrics compatibility
      • Video Player
      • Audio Recorder
    • Developing a Plugin
      • Plugin API
        • Yjs
          • Awareness
          • Scene
          • Renderer
        • Backend
          • Yjs Handler
          • Loading Frontend
          • Security
        • Frontend
          • Remote
          • Renderer
        • Media
          • Server Plugin API
          • Frontend
            • Tus
            • Form Data
        • TRPC
        • Database
      • Audio
      • Viewer State
      • Notifying Errors
      • Caveats
        • Sharing dependencies
        • Cross-over between plugins
      • Performance
  • API Reference
    • Plugin Context
  • Guide
    • Playing Audio
    • Listen to scene changes
  • Scratch Pad
    • Ambition
    • Background music
  • Environment Variables
  • External
    • Page 1
Powered by GitBook
On this page
  1. Plugins
  2. Developing a Plugin
  3. Plugin API
  4. Media

Frontend

Headers

To get upload working, we need a few information:

csrf-token

{ "csrf-token": pluginApi.env.getCSRFToken() }

organization-id

{ "organization-id": pluginApi.pluginContext.organizationId }

file-extension (optional)

If none is passed, we will read from the original file name. If none, then it'll be empty.

For tus, the original file name is obtained from metadata.filename

For form data, the original file name is obtained from the filename field.

custom-media-id (optional)

The resulting id of the media. If none is passed, we will generate one.

PreviousServer Plugin APINextTus

Last updated 5 months ago