Uploading .mov Files fails with 500 (Internal Server Error)
-
Hi nodebb-Community,
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
mp4
and others, but not formov
.Under
/admin/settings/uploads
we 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:2Other files/videos get uploaded without a fuss.
Is there some hard-coded limitation to not allowmov
-files?
What is going on there, has anybody already encountered this error?Please advise,
I'm thankful for every help/idea/suggestion. -
@sebastian-marinescu I had no problems uploading the file on my test setup
-
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?
-
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
mov
extension to the allowed file-extensions blocks it again.Now the response suggests to me somehow, that nodebb is converting the uploaded file to a
.qt
-file.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!