I have the same experience with json or php files all day. If it helps, I tried the html and txt suffix - passes.
I use PHP package - GitHub - openai-php/client: ⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
With roughly this setup:
$fileResponse = $this->gptClient->files()
->upload([
'purpose' => 'assistants',
'file' => fopen($filePath, 'r'),
]);