RAR is enabled but error
-
Hi! Very useful plugin! Thanks for it. But I have an error when try to upload RAR-file (RAR is enabled in admin):
ERROR: File you upload must be valid file type (jpg, gif, png, pdf, doc, docx, ppt, pptx, pps, ppsx, odt, xls, xlsx, rar, zip), and under 100MB(s)!I did some code analys and figured out that “finfo_file” in my case (php 5.4.32) return ‘application/x-rar’ instead of existing in plugin code ‘application/x-rar-compressed’ or in wordpress code ‘application/rar’.
So, I add some fix in plugin code in comment-attachment-init.php instead of line 331:
$this->adminPrefix . 'RAR'=> 'application/x-rar-compressed',I add:
$this->adminPrefix . 'RAR'=> array( 'application/x-rar-compressed', 'application/x-rar'),This fixed the problem. So, I decided to note about it here to help author to improve this very useful and unique plugin (I can’t find analog).
The topic ‘RAR is enabled but error’ is closed to new replies.