I did not notice this while I was staging the site but now that we are live it was discovered that users cannot upload avatars. It gives an "Invalid FIle" error regardless of the file type or size.
This appears in the terminal log:
14/2 05:23 [795] - error: /api/user/lots-0-logs/uploadpicture
Error: [[error:invalid-files]]
at middleware.validateFiles (/opt/nodebb/src/middleware/middleware.js:108:15)
at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:82:5)
at next (/opt/nodebb/node_modules/express/lib/router/route.js:110:13)
at Form.<anonymous> (/opt/nodebb/node_modules/connect-multiparty/index.js:101:9)
at Form.EventEmitter.emit (events.js:117:20)
at maybeClose (/opt/nodebb/node_modules/connect-multiparty/node_modules/multiparty/index.js:557:10)
at endFlush (/opt/nodebb/node_modules/connect-multiparty/node_modules/multiparty/index.js:552:3)
at WriteStream.<anonymous> (/opt/nodebb/node_modules/connect-multiparty/node_modules/multiparty/index.js:617:5)
at WriteStream.EventEmitter.emit (events.js:117:20)
at fs.js:1601:14
A 500 Error appears in the browser console. Here are the details:
Remote Address:173.236.248.188:80
Request URL:http://forum.antergos.com/api/user/lots-0-logs/uploadpicture
Request Method:POST
Status Code:500 Internal Server Error
Request Headersview source
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8,es;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Content-Length:25331
Content-Type:multipart/form-data; boundary=----WebKitFormBoundarydFjQjP1ZxmA6xrbo
Cookie:express.sid=s%3A_qw_9KMYChOMHC6l0fdDevj1b7LKnqCA.MJKxJamVHDxJ7mUoPypTrOG2AmA34aeXhx2TNlkk9rM
Host:forum.antergos.com
Origin:http://forum.antergos.com
Pragma:no-cache
Referer:http://forum.antergos.com/user/lots-0-logs/edit
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
x-csrf-token:de8F0HCi-UWwU_dUREF_CLYUdxTJ2ziFC-ig
X-Requested-With:XMLHttpRequest
Request Payload
------WebKitFormBoundarydFjQjP1ZxmA6xrbo
Content-Disposition: form-data; name="userPhoto"; filename="tux_question.png"
Content-Type: image/png
------WebKitFormBoundarydFjQjP1ZxmA6xrbo
Content-Disposition: form-data; name="params"
{}
------WebKitFormBoundarydFjQjP1ZxmA6xrbo--
Response Headersview source
Connection:keep-alive
Content-Length:80
Content-Type:application/json; charset=utf-8
Date:Sat, 14 Feb 2015 05:31:39 GMT
Server:nginx
Vary:Accept-Encoding
X-Frame-Options:SAMEORIGIN
X-Powered-By:NodeBB
and the response:
{"path":"/api/user/lots-0-logs/uploadpicture","error":"[[error:invalid-files]]"}
File uploading works fine for things within the admin like the site logo and category icons. They also work fine with posts. It seems that only the avatars are having the issue. Any ideas on what could be causing this?