Closed
Description
I am trying to upload an image using the JSON API.
I already added the ContentNegotiator
resource-specific to the images
resource.
I followed the docs and added this code in order to accept multipart/form-data
headers:
protected $decoding = [
'multipart/form-data' => \App\JsonApi\MultipartDecoder::class,
'multipart/form-data; boundary=*' => \App\JsonApi\MultipartDecoder::class,
];
At this point I am struggling to find or provide the MultipartDecoder
class.
Can you explain to me, what I need to do next and how I can retrieve the uploaded file in the controller?
Thank's in advance!