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?
1 Answer
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.