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

Fix for Page and Attachment Upload #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

EmreCem
Copy link

@EmreCem EmreCem commented Dec 23, 2021

ImportToken for upload could not be gathered previously. The API might've changed concerning this.
This change fixed it for me.

@EmreCem
Copy link
Author

EmreCem commented Jan 24, 2022

From https://www.mediawiki.org/wiki/API:Tokens_(action):
"Since MW 1.24, the action=tokens is deprecated and includes a warning "Please use action=query&meta=tokens instead"."

MediaWiki 1.37/Deprecation of legacy API token parameters: https://www.mediawiki.org/wiki/MediaWiki_1.37/Deprecation_of_legacy_API_token_parameters

Documentation on the new Tokens:
https://www.mediawiki.org/wiki/API:Tokens

This deprecated token query is also used in UploadAttachmentToServer function

@EmreCem EmreCem changed the title Fix for ImportToken query Fix for Page and Attachment Upload Jan 25, 2022
@EmreCem
Copy link
Author

EmreCem commented Jan 25, 2022

I also committed a change for the editToken query. Both uploading pages and uploading attachments are working as intended with these changes now. @rufuspollock is somebody still maintaining this repository? :-)

Copy link

@lookunder lookunder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented similar changes. I reverted to these and tested them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants