Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload image / photo, rest worpress api is possible? #86

Closed
andrerds opened this issue Nov 8, 2021 · 2 comments
Closed

Upload image / photo, rest worpress api is possible? #86

andrerds opened this issue Nov 8, 2021 · 2 comments
Assignees
Labels
type:question Further information is requested.

Comments

@andrerds
Copy link

andrerds commented Nov 8, 2021

Hello, is it possible to send photos through wordpress rest api to a specific endpoint?
I see that in return when doing get to users/1
I have the return of simple_local_avatar as an object, but I don't know how to send the image.
I'm using Ionic/Angular on the front.
Can you guide me?

@andrerds andrerds added the type:question Further information is requested. label Nov 8, 2021
@dkotter
Copy link
Collaborator

dkotter commented Nov 9, 2021

@andrerds Thanks for the question! Yes, you can make a POST request to the default users endpoint and within that request, send a simple_local_avatar object with the image input data and it will get set as the avatar. See https://wordpress.org/support/topic/post-avatar-using-rest-api/#post-14061014 for more info

@jeffpaul jeffpaul added the needs:feedback This requires feedback to determine next steps. label Nov 9, 2021
@andrerds
Copy link
Author

@andrerds Thanks for the question! Yes, you can make a POST request to the default users endpoint and within that request, send a simple_local_avatar object with the image input data and it will get set as the avatar. See https://wordpress.org/support/topic/post-avatar-using-rest-api/#post-14061014 for more info

Hey man, thanks a lot, I'll do the tests.

@github-actions github-actions bot removed the needs:feedback This requires feedback to determine next steps. label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Further information is requested.
Projects
Archived in project
Development

No branches or pull requests

3 participants