I resolved this. I had an invalid code. Thanks for the help.
Uploading .mov Files fails with 500 (Internal Server Error)
in our beta-forum we want our users to be able to upload movies to their posts. Right now this is working for files like
mp4and others, but not for
/admin/settings/uploadswe have following setting:
For showing them we are using nodebb-plugin-ns-embed (which is working great), but showing/embedding is not the issue right now.
When trying to upload one of two test-
mov-files, on the first one the Dev-Tools-Console just shows an error like:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) // :4567/api/post/upload
On the second test-file the console throws:
POST http://someip:4567/api/post/upload 500 (Internal Server Error)
send @ nodebb.min.js?v=ma9ju15p1ss:16
traverseFile @ nodebb.min.js?v=ma9ju15p1ss:16
(anonymous) @ nodebb.min.js?v=ma9ju15p1ss:16
a @ nodebb.min.js?v=ma9ju15p1ss:1
dispatch @ nodebb.min.js?v=ma9ju15p1ss:2
g.handle @ nodebb.min.js?v=ma9ju15p1ss:2
Other files/videos get uploaded without a fuss.
Is there some hard-coded limitation to not allow
What is going on there, has anybody already encountered this error?
I'm thankful for every help/idea/suggestion.
Any errors on the server logs? What size is the file, if you don't mind, upload it somewhere so we can test it.
@sebastian-marinescu I had no problems uploading the file on my test setup
Hm, a 500 suggests it is a server-side error. What does your NodeBB log say?
Yeah please check your server logs through CLI. Are you using an uploader plugin?
Haven't found anything yet in the server-logs.
We suspected maybe it's of a wrong mime-type or something, so we added specific htaccess-rules, to no avail.
I noticed in the network-panel the response from the upload, though:
error: "[[error:invalid-file-type, .jpg, .jpeg, .gif, .png, .mp4, .avi, .m4v, .mkv, .h264, .mov, .MOV, .MP4, .AVI]]" path: "/post/upload"
The request payload from Headers-Tab shows:
------WebKitFormBoundarymZ9EU57eiQq14CmS Content-Disposition: form-data; name="files"; filename="sample.mov" Content-Type: video/quicktime ------WebKitFormBoundarymZ9EU57eiQq14CmS Content-Disposition: form-data; name="cid" 3 ------WebKitFormBoundarymZ9EU57eiQq14CmS Content-Disposition: form-data; name="_csrf" BwAbYj1K-4EVzgcVhk8tTyZBNzIQVBBd7f0k ------WebKitFormBoundarymZ9EU57eiQq14CmS--
Is this interesting?
What is your nodebb git hash?
@baris My git-hash in the nodebb-directory is
I'm on the
So, I just tested leaving the allowed filetypes-field blank (ergo allowing everything) and that worked. The mov-file gets uploaded flawlessly.
But interestingly the response is:
name: "sample.mov" path: "/opt/bitnami/apache2/htdocs/public/uploads/files/1496310135527-sample.qt" url: "/assets/uploads/files/1496310135527-sample.qt"
Adding just the
movextension to the allowed file-extensions blocks it again.
Now the response suggests to me somehow, that nodebb is converting the uploaded file to a
So I just added the qt-extension to the allowed files and it works.
It's really weird behavior, but I found a solution. Thanks for participating everyone!