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 for mov.

    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:2

    Other files/videos get uploaded without a fuss.
    Is there some hard-coded limitation to not allow mov-files?
    What is going on there, has anybody already encountered this error?

    Please advise,
    I'm thankful for every help/idea/suggestion.

  • Admin

    Any errors on the server logs? What size is the file, if you don't mind, upload it somewhere so we can test it.

  • Hi @baris,
    under both pages admin/advanced/logs and admin/advanced/errors are no errors or warnings regarding the upload.

    The one test-file I used is the Sample MOV File from this list. It's 500kb.

  • Plugin & Theme Dev

    @sebastian-marinescu I had no problems uploading the file on my test setup

  • Admin

    Hm, a 500 suggests it is a server-side error. What does your NodeBB log say?

  • Admin

    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:invalid-file-type, .jpg, .jpeg, .gif, .png, .mp4, .avi, .m4v, .mkv, .h264, .mov, .MOV, .MP4, .AVI]]"

    The request payload from Headers-Tab shows:

    Content-Disposition: form-data; name="files[]"; filename="sample.mov"
    Content-Type: video/quicktime
    Content-Disposition: form-data; name="cid"
    Content-Disposition: form-data; name="_csrf"

    Is this interesting?

  • Admin

    What is your nodebb git hash?

  • @baris My git-hash in the nodebb-directory is fb2f857af2be85971f9a2d83c5458176b174c604

    I'm on the v1.x.x branch.

  • 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:


    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!



Looks like your connection to NodeBB was lost, please wait while we try to reconnect.