# 非決定的なファイルアップロード問題 .mod ASCIIファイルについて

**URL:** <https://meta.discourse.org/t/non-deterministic-file-upload-issues-with-mod-ascii-files/277031>\
**Category:** Bug\
**Created:** [2023 年 8 月 29 日午後 12:28 UTC](https://meta.discourse.org/t/non-deterministic-file-upload-issues-with-mod-ascii-files/277031 "2023-08-29T12:28:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![JohannesPfeifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johannespfeifer/32/323183_2.png) [@JohannesPfeifer](https://meta.discourse.org/u/JohannesPfeifer)\
**Post date:** [2023 年 8 月 29 日午後 12:28 UTC](https://meta.discourse.org/t/non-deterministic-file-upload-issues-with-mod-ascii-files/277031/1 "2023-08-29T12:28:18Z")

</div>

Dynare プロジェクトは、公式 Docker イメージに基づいた Discourse フォーラムを実行しています。使用される主なファイルタイプは、末尾が `.mod`（「model」の略）の ASCII ファイルです。約1か月前から、ユーザーはこのファイルタイプ（他のファイルタイプは除く）のアップロードでランダムに（約50%のケースで）問題が発生しています。アップロードは単に[スタック] ([Prior distribution for parameter rhoA has unbounded density! - ML/Bayesian estimation - Dynare Forum](https://forum.dynare.org/t/prior-distribution-for-parameter-rhoa-has-unbounded-density/22943?u=jpfeifer))します。  
 ![image](https://global.discourse-cdn.com/meta/original/4X/6/0/7/6072a2e64aba7ea76feda4d7f074478ba2853864.png)

同じ内容を `.txt` の末尾でアップロードしたり、zip ファイルでアップロードしたりすると機能します。残念ながら、管理者でさえ、影響を受けているユーザーになりすましても、問題を再現できませんでした。

Discourse が `.mod` ファイルを[メディアファイル](https://en.wikipedia.org/wiki/MOD_and_TOD)として扱おうとしているため、ファイル変換の試行に問題があるのではないかと推測しています。実際の `.mod` ビデオファイル（VideoLAN などでサポートされている）をアップロードしようとすると、次のエラーメッセージが表示されます。

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

```

このメッセージは、「png to jpg quality」設定が変換をオフに設定されていても表示されます。

---

_[View the full topic](https://meta.discourse.org/t/non-deterministic-file-upload-issues-with-mod-ascii-files/277031)._
