Skip to main content

📦 Import & Export

TriviaFlow supports a powerful bulk import/export system. This allows you to:

  1. Backup your hard work.
  2. Share quizzes with other Game Masters.
  3. Programmatically generate quizzes using scripts.

📤 Exporting Quizzes

You can export quizzes as a .zip archive containing the data and all associated images.

  1. Navigate to quizzes.
  2. Check the box next to the quizzes you want to export.
  3. In the Actions dropdown, select "Export selected Quizzes (ZIP)".
  4. Click Go.

The browser will download a ZIP file containing:

  • data.json: The definitions of questions and texts.
  • images/: A folder with all the original image files used.

📥 Importing Quizzes

To restore a backup or add new content:

  1. Navigate to quizzes.
  2. Click the Import (ZIP) button in the top right (or "Upload ZIP" depending on your version).
  3. Select your .zip file.
  4. Confirm.

The system will verify the file structure and create the quizzes. Images will be added to the Media Library automatically.


🧑‍💻 Technical Format

If you are a developer, you can create these ZIP files manually.

Structure

my-export.zip
├── Quiz_Title_ID/
│ ├── data.json # Contains titles, questions, and options
│ └── images/ # Folder containing the actual image files
│ ├── 1_logo.png
│ └── 2_poster.jpg

JSON Schema (data.json)

The image and resolution_image fields are optional. If a question does not need an image, you can omit these keys entirely or set them to null.

Example 1: Text-Only Question

This is the simplest form. No image fields are required.

{
"title": "History Quiz",
"description": "Standard text questions",
"questions": [
{
"text": "What is the capital of France?",
"duration": 20,
"options": ["Berlin", "Madrid", "Paris", "Rome"],
"correct": "C"
}
]
}

Example 2: Image-Based Question

If you want to use images, you must include the filename that matches the file inside the images/ folder.

{
"title": "Visual Quiz",
"questions": [
{
"text": "Which landmark is shown here?",
"duration": 20,
"options": ["Eiffel Tower", "Big Ben", "Statue of Liberty", "Colosseum"],
"correct": "A",
"image": "1_eiffel_tower.jpg",
"resolution_image": "1_eiffel_reveal.jpg"
}
]
}
Image Matching

The filename in data.json (e.g., "1_eiffel_tower.jpg") must exacty match the filename inside the images/ folder of the ZIP.