Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

symfony4, api-platform upload file : Format "multipart/form-data" is not supported

$
0
0

I would like to do an API with symfony 4, api-platform which allow to upload file and run a system commande with it and delete it. I want use in a controle somethink like :

$uploadedConfig = $request->files->get('cfgfile');
exec("mycall ".$uploadedConfig->getPathname());

But I have the following errors : Format "multipart/form-data" is not supported

my test is :

curl -X POST -F 'cfgfile=/tmp/maconf' http://<IP>/api/config -H "Content-Type: multipart/form-data"

thanks Thomas


Viewing all articles
Browse latest Browse all 3924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>