0

I am building a Laravel-based web API. In the project, we want to upload image using post method to the API server directly via an Android/iOS app. How can we do it?

karel
  • 5,489
  • 46
  • 45
  • 50

1 Answers1

0

The server will take a POST request from clients with media file properly if you are posting a file with Content-Type as multipart/form-data.

See documentation on how you can accept/save files in laravel.

See this thread to see how you can post a multipart/form-data POST in android for reference.

Mihir Bhende
  • 8,677
  • 1
  • 30
  • 37