I'm building a REST API Service using PHP. I know how to receive file in standard html form(multipart/form-data).
But in my service I want to use json. So the question is, how to upload file when the client use Content-Type:application-json? How to embed a file in JSON?
Or is there some other or standard way that I must follow regarding REST API design?