Closed typeoo closed 6 months ago
curl commands to test:
curl -F 'file=@test.mp3;type=audio/mpeg' localhost:8888
curl -F 'file=@test.mp3;type=audio/mpeg;filename=test' localhost:8888
curl -F 'file=sometext;type=text/plain;filename=test' localhost:8888
This requires implementing #217 first
curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'file' => new CURLFile('test.mp3;type=audio/mpeg'), ]);
it should be like:
curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'file' => new CURLFile('/var/www/html/voice/test.mp3',"audio/mpeg","test") ]);