📦 Import & Export
TriviaFlow supports a powerful bulk import/export system. This allows you to:
- Backup your hard work.
- Share quizzes with other Game Masters.
- Programmatically generate quizzes using scripts.
📤 Exporting Quizzes
You can export quizzes as a .zip archive containing the data and all associated images.
- Navigate to quizzes.
- Check the box next to the quizzes you want to export.
- In the Actions dropdown, select "Export selected Quizzes (ZIP)".
- 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:
- Navigate to quizzes.
- Click the Import (ZIP) button in the top right (or "Upload ZIP" depending on your version).
- Select your
.zipfile. - 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"
}
]
}
The filename in data.json (e.g., "1_eiffel_tower.jpg") must exacty match the filename inside the images/ folder of the ZIP.