wp-api-v2-client-java
wp-api-v2-client-java copied to clipboard
Creating media using ByteArrayResource causes HTTP/400 response.
The method to create a media item is: Wordpress.createMedia(mediaObject:Media, resource:Resource)
This allows for using ByteArrayResource, but an HTTP/400 error response is returned.
From investigation thus far, it proves that the filename;
part in Content-Disposition
is not populated when using a ByteArrayResource. ByteArrayResource does not override getFileName
which returns null by default.