-
Hi, func NewfileUploadRequest(c* gin.Context) {
} but when i hit the request i got 415 unsupported media type can someone point out where i did wrong here? and is it possible to use application/json with image being converted to base64 instead? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'd first try with the "Content-Type: application/json" header since this is a POST call: https://netbox.readthedocs.io/en/stable/rest-api/overview/#creating-a-new-object |
Beta Was this translation helpful? Give feedback.
-
*Edit : anyway, here is my code for somebody need, hope my code usefull func NewfileUploadRequest(c* gin.Context) {
} |
Beta Was this translation helpful? Give feedback.
*Edit :
i fix my problem here
anyway, here is my code for somebody need, hope my code usefull
func NewfileUploadRequest(c* gin.Context) {
url := "http://ip/api/extras/image-attachments/"