Upload of .ico and .exe
-
Hi All,
Adding .ico and .exe extensions to the "Allowed File Extensions" in Settings->Upload seems to be to no avail.
The users who needs to upload has received "Upload Files" and "Upload Images" in Manage->Privileges and these privileges are "Global".
We also activated "Allow users to upload regular files" in Settings->Upload.
Uploading other files such as .png works without issues.
Uploading .ico results in "ERROR Input file is missing or of an unsupported image format"
Uploading .exe results in "ERROR You do not have enough privileges for this action"
Uploading .ico used to work, until two NodeBB upgrades ago, or so.
Perhaps I should mention that we store all uploaded files locally.
NodeBB is at v1.11.1 on Ubuntu 16.04.
Do I miss something glaringly obvious since, no one else appear to have this issue?
Thank you
-
What's the content of the extensions field? Take a screenshot if you can
-
@kgl3 The exe thing was glaringly obvious. The UI for normal users needed a reload (F5).
But the ico issue persists and it seems that it is due to some special handing of icon files in NodeBB. Temporarily disabling the "isImage" check in uploadPost makes NodeBB treat .ico as a regular file, without properly checking, then I believe that NodeBB fails to accept ico files because it can't do the size checks.
On a side note, then NodeBB doesn't seem to be happy to handle files larger than 2048KiB regardless of settings in Settings->Uploads. 7MB exe files are rejected regardless, by the upload mechanism.
-
@kgl3 said in Upload of .ico and .exe:
On a side note, then NodeBB doesn't seem to be happy to handle files larger than 2048KiB regardless of settings in Settings->Uploads. 7MB exe files are rejected regardless, by the upload mechanism.
Are you use a reverse proxy? Nginx (and likely every other reverse proxy) also have their own upload file size rules that need to be adjusted
-
You were right about the nginx
The ico issue persists though, recently upgraded to 1.12.2 and uploading ico files still fails despite whitelisting them in the extensions field.
After disabling the isImage check (in src/controllers/uploads.js), then it works flawlessly. I suppose this isn't a big issue since we don't need the size checks and all that stuff on image uploads.
But it would be nice if uploading .ico files could work without having to edit the source.
Thank you