Prompt Lab
⚙️ Admin & Setup 4 min read

The Media Library

Upload images, PDFs, Word docs, and videos, or link to YouTube — and attach them to any module.

The Media Library at /admin/media is a central store for all files and external links you want to use in your modules.

Supported file types

TypeExtensionsExtra features
📄 PDF.pdfText extracted automatically for AI quiz generation
📝 Word.docx, .docText extracted automatically for AI quiz generation
🖼️ Image.jpg, .jpeg, .png, .gif, .webp, .svgInline thumbnail preview
🎥 Video file.mp4, .webm, .mov, .m4vInline video player
▶️ YouTube/VimeoURLAuto-generates embed; inline iframe preview
🔗 External linkAny URLStored and linked

Uploading a file

  1. Go to Admin → Media Library.
  2. In the left panel, make sure ⬆️ Upload file tab is selected.
  3. Drag and drop a file onto the drop zone, or click to browse.
  4. The filename auto-fills the Title field — edit it if you want a friendlier name.
  5. Optionally add a description and link it to a module.
  6. Click Save.

Adding an external link

  1. Switch to the 🔗 External link tab.
  2. Paste any URL — YouTube, Vimeo, or any webpage.
  3. YouTube and Vimeo URLs are automatically detected and an embed iframe is generated.
  4. Add title and description, link to a module, click Save.

AI quiz generation from PDFs

If you've uploaded a PDF or Word doc and have an OpenAI API key configured, a 🎯 Gen quiz button appears on the media card. Click it to:

  1. Send the first 3,000 characters of extracted text to the AI.
  2. Get a multiple-choice question generated on the spot.
  3. Copy the question into the Quiz editor for the relevant module.

Attaching media to modules

When you upload or add a link, choose a module from the Attach to module dropdown. That media then appears in the 📁 Attached media panel on that module's edit page.

Storage

Uploaded files are stored in the uploads/ folder inside the project root. File names are randomised (UUID) to prevent conflicts. The media index is kept in data/media.json.

Was this article helpful?
📚 All articles Start learning →