Non-deterministic file upload issues with .mod ASCII files

The Dynare project runs a Discourse forum based on the official Docker image. The main file type used are ASCII files with the ending .mod (for “model”). Since about a month or so, users are randomly (≈50% of the cases) experiencing upload issues for that filetype (and no other file type). The upload simply gets stuck:

Uploading the same content with .txt ending or in a zip-file works. Unfortunately, the administrators have not been able to replicate the issue, even when impersonating the users affected.

Our hunch is that there is an issue with attempted file conversions, because Discourse seems to attempt to treat the .mod-file as a media file. Trying to upload an actual .mod video file (as supported e.g. by VideoLAN) results in the error message:

/var/www/discourse/lib/discourse.rb:137:in `exec': An error happened when converting from PNG to JPG

That message appears even if the png to jpg quality-setting is set to shut off conversions.


Just an odd idea, not even high on the list, but what you noted conjured this up.

If the admins are impersonating a user they are probably not using the same route from client machine to server. I am thinking that a service like Cloudflare might be in the mix.

Thanks. The server uses the CloudFare DNS servers. But I doubt this affects our Discourse instance because it is in its own container and thus uses the DNS servers configured by the Discourse developers.

Hi Johannes,

I haven’t been able to repro your issue, even using a new, non-staff account with .mod ASCII files.

Does it only happen for some of your users?

Thanks for looking into this. Overall, it seems to happen randomly. I don’t know whether it happens consistently for some subset of users and not at all for others. But users who encounter the issue seem to give up and subsequently paste the file’s text content. So that may be the case.

It would be interesting to know their device/OS/browser. :slight_smile:

Indeed, unfortunately, I don’t have that information yet. I will ask some users and report back.