Is it possible to send an image using `plugin-api`
I have a leveling bot and a dashboard for it, i was wondering if there was a way to get the users rank card from the api instead of generating the image on the dashboard.
Solution:Jump to solution
response.setContentType(MediaTypes.ImagePng).status(200).end(bufferOfTheImage)
if i remember correctly. Let me know if it works. We could add utility methods for this.7 Replies
Solution
response.setContentType(MediaTypes.ImagePng).status(200).end(bufferOfTheImage)
if i remember correctly. Let me know if it works. We could add utility methods for this.this worked
after i changed
MediaTypes
to MimeTypes
but i just assumed that was a typoit was
@Oreo ™ I was writing Java backend all day and with Spring Framework it is MediaTypes so that's why I made the mistake.
yeah its cool
would be nice if there was an easier way to do this
there it's released in 6.1.0 @Oreo ™
nice