• Resolved mubasher99

    (@mubasher99)


    First of all, sorry to disturb you on this topic, as the tool said you will provide limited help on this topic. My issue is when so ever i am uploading the csv then it shows the error: Unable to determine upload MIMETYPE. I see this error even if upload the “demo csv file” provided in the tools documentation.
    i search for the solution 1st on this plugin support. and there was one who had same issue.
    you told him to edit few line in the plugin. I checked it and found that the file has been updated and shifted to /hd-quiz/classes/csv-import-tool.php.
    please tell me what to do. I am total blank after trying to fix issue for 3 days.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Security is important, this is why one of the security requirements for HD Quiz to upload a file is to check the file’s mimetype to help ensure that the file you are uploading is not malicious.

    Under the PHP Configuration heading of the documentation for this feature (found here: https://hdplugins.com/learn/documentation/hd-quiz-documentation/#hd_i-have-a-problem-with-the-csv-importer) you will find additional information about what your specific problem likely is.

    In short: I need to check for the mime type of the file uploaded for security, and your server does not have the PHP extensions required to do so (note: almost every server will have these extensions enabled by default).

    Your options are to either:

    • A) RECOMMENDED: Activate the missing extension (likely the fileinfo PHP extension)
    • B) Modify HD Quiz to bypass the mimetype check (you can do this by editing hd-quiz/classes/csv-import-tool.php and comment out/remove line 133 $this->validateFileType();
    Thread Starter mubasher99

    (@mubasher99)

    Thank you for the help 🙂
    i did both things. checked the box extension in “Select PHP Version” in cpanel to allow this file type. you know what nothing happend. (upload file button is unclickable now).
    then i tried the step 2 provided by you and stroke out the line 133 from the code. this time too same result. button is unclickable (neither it uploads nor it send the message)

    we are almost there.. just help me a bit

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    It’s 100% impossible for either of those above changes to affect the clickability of a button.

    You must have something else broken on your site setup/server (for example, I see that your SSL certificate is down at the moment, and the homepage provides a 403 Forbidden error – assuming this problem is on the “mcqs” site you previously posted).

    Beyond what I’ve already recommended, all I can offer more is general debugging steps. Clear all of your caches (browser, site, host, dns, anything else), and do the basic WordPress debug steps (disable all plugins except HD Quiz, use a default WordPress theme, check to see if uploads are still broken for you).

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

The topic ‘unable to upload CSV FIle’ is closed to new replies.