Quiz upload of CSS files
-
I have a course site where my students are supposed to upload their CSS files in a quiz file upload. I’ve tried both adding:
define( 'ALLOW_UNFILTERED_UPLOADS', true);
to my wp-config and also adding the css mime type to senseilms via:
function mytheme_mime_type($mimes, $question_id){ $mimes['css'] = 'text/css'; $mimes['html'] = 'text/html'; $mimes['psd'] = 'image/vnd.adobe.photoshop'; return $mimes; } add_filter( 'sensei_quiz_answer_file_upload_types', 'mytheme_mime_type', 1, 2 );
After that, I can upload HTML files in the quiz but CSS files are still not working. When saving the quiz it just says “Quiz saved” but no file is uploaded.
If I go to the media repository I have no problems uploading css-files.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Quiz upload of CSS files’ is closed to new replies.