-
Notifications
You must be signed in to change notification settings - Fork 33
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 images #13
Comments
Hey @progressify , try using the demo code in the readme and see how that goes. I've only ever got it working on WP API with basic auth. |
Hi @derwentx , ty for reply This is my code:
I don't know whats is wrong. |
The sample code to upload doesn't work, without the basic auth plugin linked to from here: https://github.com/stylight/python-wordpress-json |
Hey @pembo13 and @progressify , I've update the documentation to be more clear that image upload only works with basic auth. If anyone is still having trouble uploading images with basic auth, try replicating this unit test: https://github.com/derwentx/wp-api-python/blob/b75420c85a6411235dc49bf7bb7cbf82700b2180/tests/test_api.py#L459 If anyone would like to make a fix for this, you're welcome to submit a PR. Just a reminder to everyone that ends up on this thread: I am no longer regularly maintaining this repo , and for this reason I would advise against people using it until a new maintainer is found I will be accepting pull requests, and will gladly link to a maintained fork. Thanks. |
Hi
I have tried the code snippet in the readme for upload image with basic auth, but I receive always:
But the user is an admin and it is ok for other apis, I can create posts and categories.
Does someone know what can be the problem?
The text was updated successfully, but these errors were encountered: