I have been using the Golang framework Gin for some time without problems, but now I need to process the images sent to my API.
Maybe I can figure out how to handle checking, resizing and saving the image, but for now I'm just trying to figure out how to capture the published file and assign it to a variable.
I looked at the Gin API docs but nothing jumps at me.
I am twisting my API as follows (could this be wrong?) ...
$ time curl -X POST --form upload=@ss.png -H "Content-Type: application/json" --cookie 'session=23423v243v25c08efb5805a09b5f288329003' "http://127.0.0.1:8080/v1.0/icon" --form data='{"json_name":"test json name","title":"Test","url":"http://sometest.com"}'
source share