• Resolved ahmedradwan

    (@ahmedradwan)


    Hello

    Thanks for all your help so far. However, my students are not able to upload files at all after the latest update. This time the message says “The following files were not within the allowed file types and were not uploaded”

    In my settings, I tried two things:
    1- type the accepted formats like (doc, docx, pdf) and so on. This did NOT work at all.

    2- I left the area empty like instructed to accept all file types. This also did NOT work at all.

    It used to work fine before I updated to the latest version. Could you please help? This is an urgent matter and it is affecting the courses I’m using on the website.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ahmedradwan

    (@ahmedradwan)

    Just something to note here: I tried it again but this time I checked the option ( Store the files in the filesystem instead of the database. ) This time it worked. But this means that I am forced to use this option of storing the solutions?

    Plugin Author Bob

    (@prasunsen)

    I can’t fix this because I can’t reproduce it and can’t imagine any possibility it would happen. Here’s the piece of code that checks:

    if(!empty($allowed_file_types) and count($allowed_extensions) and !in_array($ext, $allowed_extensions)) {
    	$file_errors[] = $file; 
    	continue;
    }

    If $allowed_file_types is empty it could not get into the check, that’s just impossible. I have absolutely no idea why it could be happening.

    The only solution I can suggest is to remove the code altogether from controllers/homeworks.php lines 88 – 91

    If another programmer is reading this, please have a look at the code and let me know if we are missing anything. We are doing PHP for 15 years here and can’t see how such problem could be possible in any way.

    Plugin Author Bob

    (@prasunsen)

    I found it, it was another check later below that failed. Fixed.

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

The topic ‘Uploading Files doesn’t work after last update’ is closed to new replies.