Symfony - API Platform - File Upload
I am using postman and symfony 4.x for this answer.
API URL: localhost/api/media_objects (localhost => baseURL)
Select form-data => Key should be file and select type File ( Ifyou hover to right side to input you will see drop down)
Choose file and post.
NOTE: you must have config/packages/vich_uploader.yaml with configurations like
vich_uploader: db_driver: orm
mappings: media_object: uri_prefix: /media upload_destination: '%kernel.project_dir%/public/media' namer: Vich\UploaderBundle\Naming\UniqidNamer