I am ready do retrieve, delete a picture from Drupal server utilizing companies
https://instance.com/entity/file/[fid]
However I could not in a position to do the identical for updating. I attempted like follows to replace the present picture.
URL: https://instance.com/entity/file/[fid]?_format=json
Headers:
Settle for:utility/vnd.api+json
Content material-Sort:utility/octet-stream
Content material-Disposition:file;filename=”check.png”
Physique:
[binary format of the new image]
Technique:
PATCH
Output:
{
"message": "No route discovered that matches "Content material-Sort: utility/octet-stream""
}
I attempted to vary the ‘Content material-Sort: utility/json’ however no luck.
For now to replace the picture, I needed to to make DELETE and POST requests to delete and create new picture on the server. Once more I’ve to connect the brand new fid
to the node to finish the replace course of, that does not sounds good.
Any inputs on this?