Support » Plugin: Manager for Icomoon » unable to upload icomoon zip file

  • vavav

    (@vaibhavdugar)


    hi,
    i am unable to upload the zip file. it says incorrect format even though i am uploading the zip file downloaded from the website: icomoon

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, same here,

    After a short investigation, I figured out that in line 236 of managerforicomoon.php (in the plugin folder), the plugin is testing MIME type.

    if($file_info['extension'] != "zip" or $_FILES['managerforicomoon-zip']['type'] != 'application/zip'){

    It scans for application/zip.
    A var_dump test showed me that when I try to uplaod, the type is “application/x-zip-compressed” which can be reasonnably considered as accepted type.

    Just reflect the change or bypass it, for example

    before:
    if($file_info['extension'] != "zip" or $_FILES['managerforicomoon-zip']['type'] != 'application/zip'){

    after :
    if($file_info['extension'] != "zip" or ($_FILES['managerforicomoon-zip']['type'] != 'application/zip' && $_FILES['managerforicomoon-zip']['type'] != 'application/x-zip-compressed')) {

    Worked for me.

    Plugin Author albedo0

    (@albedo0)

    Hi,

    I fix the problem ! Sorry for the inconvenient

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘unable to upload icomoon zip file’ is closed to new replies.