wp-api-v2-client-java icon indicating copy to clipboard operation
wp-api-v2-client-java copied to clipboard

Creating media using ByteArrayResource causes HTTP/400 response.

Open johanmynhardt opened this issue 7 years ago • 1 comments

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.

johanmynhardt avatar Sep 07 '17 10:09 johanmynhardt

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.

johanmynhardt avatar Sep 07 '17 10:09 johanmynhardt