-
Hi everyone. I am trying to upload media using the following approach: var result = wp_client.Media.Add("My Test Logo", "C:\\Users\\Admin\\Downloads\\logo-lg.png").GetAwaiter().GetResult(); As a result I get the following exception:
Does anyone know why do I receive such response? |
Beta Was this translation helpful? Give feedback.
Answered by
fairking
Oct 5, 2024
Replies: 1 comment
-
My bad. I figured out that I should use filename for the client.Media.Add("logo-lg.png", "C:\\Users\\Admin\\Downloads\\logo-lg.png"); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fairking
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My bad. I figured out that I should use filename for the
name
field: