• Resolved dholly

    (@dholly)


    When i choose upload file as my question, then by default it allows only a few type of files (pdf, doc, image and etc) is it possible to extend allowed types, so i could upload a file with custom format?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @dholly

    As of now, there are no such options available. It will only support the default formats only.

    Can you please tell me the custom formats that you want to allow? So I will discuss this with our developers and get back to you.

    Regards,
    Sumit

    Thread Starter dholly

    (@dholly)

    Hello and thanks for response! I was thinking about archives (zip or rar files), it would cover all necessary formats per se

    Hi @dholly

    I need to discuss this with my development team. Hopefully, I will get back to you with the solution.

    Regards,
    Sumit

    Hi @dholly

    Thank you for your inquiry regarding a potential new feature. Our team is currently evaluating its feasibility and if it meets our standards of quality, we will consider incorporating it into a future release.

    Thank you for your interest in our product.

    Best regards,
    Sumit

    sumitsanadhya

    (@sumitsanadhya)

    Hi @dholly ,

    I would like to inform you that the .zip extension has not been allowed in the plugin as it poses potential security risks. However, if you still wish to enable it, please consider using the following code:

    /*Update question options
    ** @param array $advanced_question_option question options
    ** return array $advanced_question_option modified question options
    / function update_qsm_question_advanced_option( $advanced_question_option ){ $advanced_question_option[‘file_upload_type’][‘options’][‘zip’] = __( ‘Zip’, ‘quiz-master-next’ ) ; return $advanced_question_option; } add_filter( ‘qsm_question_advanced_option’, ‘update_qsm_question_advanced_option’, 20, 1); /Update question options upload type mines
    ** @param array $mimes
    ** return array $mimes modified mimes
    */
    function update_qsm_file_upload_mime_type( $mimes ){
    $mimes[] = ‘application/zip’;
    return $mimes;
    }
    add_filter( ‘qsm_file_upload_mime_type’, ‘update_qsm_file_upload_mime_type’, 20, 1);

    After adding the code to your function.php file, kindly verify if the issue has been resolved.

    Let me know if you need more help.

    Regards,
    Sumit

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Upload file type (format)’ is closed to new replies.