I'm building an app, with React.js and Express.js, in which the user can create a quiz, and I want it to be able to use text and images to illustrate each question and each option. By now, the structure of the data beeing sent through front-end and back-end is something like this:
{
"title": "Quiz title",
"description": "This is my example of description",
"questions": [
{
"optionsText": ["A", "B","C"],
"questionText": "chose one letter, please",
"selectedRightOptionNumber": 0
},
{
"optionsText": ["D", "E","F"],
"questionText": "chose one letter, please",
"selectedRightOptionNumber": 2
}
]
}
How can I send the images alongside the data? Remember that I need to know in the back-end which image belongs to which question, option or if it is the main quiz image.