0

i have an api that recieves an image in byte, but for some reason to the api arrives an empty parameter, what do i am doing wrong?

i send this from postman to the api, the image is the only parameter that doesnt arrive correctly

enter image description here

enter image description here

Agustin Coronel
  • 297
  • 4
  • 12
  • What type is the vac_imagen parameter? Try changing it to a string and converting after? Dim vOut() As Byte = System.Text.Encoding.UTF8.GetBytes(vac_imagen) – Ryano Feb 18 '22 at 03:36
  • my vac_imagen parameter is defined like this Public Property vac_imagen As Byte() – Agustin Coronel Feb 18 '22 at 03:47
  • i tried using "Dim imagenenbytes as Byte()= System.Text.Encoding.UTF8.GetBytes(vac_imagen)" but when i want to became the bytes array into a image using "Dim Imagenreducida as Image = DirectCast(New ImageConverter().ConvertFrom(imagenenbytes), Image)" it says me invalid parameter – Agustin Coronel Feb 18 '22 at 04:27
  • It looks like you should expect a Base64 encoded string. – Jimi Feb 18 '22 at 04:52
  • how do i do that? – Agustin Coronel Feb 18 '22 at 10:52
  • @AgustinCoronel `how do i do that?` Take a look at :https://stackoverflow.com/questions/11743160/how-do-i-encode-and-decode-a-base64-string – Xingyu Zhao Feb 21 '22 at 01:44

0 Answers0