Improved question-type selection and fixed bug where Check Choice and ABCD were inverted

This commit is contained in:
Mawoka
2023-06-17 13:35:36 +02:00
parent b4c6f7f0ac
commit cc7d3a489b
16 changed files with 154 additions and 57 deletions
@@ -17,15 +17,11 @@
return;
}
const res = await fetch(`/api/v1/storage/info/${src}`);
console.log('Headers', res.headers);
const fileType = res.headers.get('Content-Type');
console.log(fileType, 'fileType');
if (fileType.includes('video')) {
console.log('Setting type to video');
type = 'video';
} else {
type = 'img';
console.log(res);
const data = await fetch(`/api/v1/storage/download/${src}`);
return {
data: URL.createObjectURL(await data.blob()),