API Upload File not uploading

Hi @NexusNine

For me, the uploads is now working well. Are using the same version that was using (5.7.0)?
I’m usign the lastest version right now and works correctly.

I installed follwing this guide: https://docs.mattermost.com/install/prod-docker.html

Are you using PHP? If you are, so this is my script. Maybe can help you:

            $curl = curl_init();

            curl_setopt_array($curl, array(
                CURLOPT_URL => env('MATTERMOST_URL')."/api/v4/files",
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_ENCODING => "",
                CURLOPT_MAXREDIRS => 10,
                CURLOPT_TIMEOUT => 0,
                CURLOPT_FOLLOWLOCATION => false,
                CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                CURLOPT_CUSTOMREQUEST => "POST",
                CURLOPT_POSTFIELDS => array('files' => curl_file_create($destinationPath.'/'.$name), 'channel_id' => $channel_id),
                CURLOPT_HTTPHEADER => array(
                    "Authorization: Bearer ".Auth()->user()->chat_token,
                    "Content-Type: multipart/form-data"
                ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);
            curl_close($curl);