Closed jbdesbas closed 3 years ago
I'm having the same problem. Manually hardcoding some other mimetype into src/Helpers/Util.php:82 works, so I'm falling back to the default case specified in the code.
I just tried to reproduce the issue with a clean and fresh manual install in a container via composer, using Ubuntu 20.04 + Aapche2, following the installtion instructions.
Here's some info about the setup:
Flarum core 0.1.0-beta.15 PHP version: 7.4.3 Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache +----------------------+----------------+--------+ | Flarum Extensions | | | +----------------------+----------------+--------+ | ID | Version | Commit | +----------------------+----------------+--------+ | flarum-approval | v0.1.0-beta.15 | | | flarum-bbcode | v0.1.0-beta.15 | | | flarum-emoji | v0.1.0-beta.15 | | | flarum-lang-english | v0.1.0-beta.15 | | | flarum-flags | v0.1.0-beta.15 | | | flarum-likes | v0.1.0-beta.15 | | | flarum-lock | v0.1.0-beta.15 | | | flarum-markdown | v0.1.0-beta.15 | | | flarum-mentions | v0.1.0-beta.15 | | | flarum-statistics | v0.1.0-beta.15 | | | flarum-sticky | v0.1.0-beta.15 | | | flarum-subscriptions | v0.1.0-beta.15 | | | flarum-suspend | v0.1.0-beta.15 | | | flarum-tags | v0.1.0-beta.15 | | | fof-upload | 0.12.1 | | +----------------------+----------------+--------+ Base URL: http://10.0.3.129 Installation path: /var/www/html Debug mode: off
Steps to reproduce:
If I can provide more info, let me know.
Btw, I'm getting the same error message in the log:
[Sun Jan 10 18:09:45.382814 2021] [php7:notice] [pid 305] [client 10.0.3.1:43384] PHP Notice: Undefined property: FoF\Upload\Helpers\Util::$mimeTypes in /var/www/html/vendor/fof/upload/src/Helpers/Util.php on line 58, referer: http://10.0.3.129/
MimeType extraction from the DB breaks with commit c8a4a4399171019b5b5c21ed0bfc1206c785904f. It seems like the mimeTypes setting still relies on the settings methods, which were removed when changing the class from Settings to Util.
Hi,
It seem the system can't read the configured mimeType policy, so only the default behaviour is occuring (allow only image, write in local folder). Instead the maximum file size configuration is correctly applied.
Any idea ?
I am using this install : https://github.com/crazy-max/docker-flarum
Regards,