-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Better upload API #17
Comments
Some usage issues:
|
For issues related to Wikimedia Commons, I have a hunch that the actual Tags, Geo Locations, Descrptions and Dates are all on Wikidata, which is actually out of the scope of my little project. (Sorry; but you can try to write one using For example, c:File:Forbidden City Beijing Shenwumen Gate.JPG is related to d:Q2047427 (see image section). The former does not have any of the properties as you mentioned; but the latter does. |
I see your point. It's possible using the comment string to place wiki data. I can agree it might be out of scope for this project, the rest is still relevant though. |
Sure, I have just looked into this…
The {
"upload": {
"result": "Warning",
"warnings": {
"exists": "Test_image.jpg",
"nochange": {
"timestamp": "2017-09-09T17:19:55Z"
},
"duplicateversions": [
{
"timestamp": "2017-09-09T17:18:43Z"
},
{
"timestamp": "2017-09-09T17:16:06Z"
},
{
"timestamp": "2017-09-01T11:42:01Z"
},
{
"timestamp": "2017-07-11T15:23:46Z"
},
{
"timestamp": "2017-07-11T14:54:25Z"
},
{
"timestamp": "2017-07-01T07:29:21Z"
}
]
},
"filekey": "155v0844eoek.n3tctb.6332.jpg",
"sessionkey": "155v0844eoek.n3tctb.6332.jpg" /* For backward compatibility */
}
} Then you may turn on |
I will fix that. If you are not explicitly specifying namespace, the method should assume you are using File: namespace. |
Add documentation for UploadResult.FileKey.
FYI, mw:Wikibase/API has some explanations on Wikibase API, such as My rough idea is to create something like |
Uhmmm, I didn't took a thorough walk-through on uploading a picture to Wikimedia Commons until I found out a test site for it. It's not until then did I realize that I really have misunderstood something… For example that the geo location has nothing to do with Wikidata. So you just need to use appropriate templates on the description page for them, for example =={{int:filedesc}}==
{{Information
|description={{en|1=English description}}
{{zh|1=汉语描述}}
|date=2017-10-01
|source=Source URL here
|author=Author name here
|permission=
|other versions=
}}
{{Location|12|23}} Fill in the blanks, and it's done. Sorry for the confusion I used to cause… However I have already written a Wikibase API client and there's no way going back. |
Thanks! I have updated to latest version. |
When using the wikimedia common upload wizard the following fields are editable:
Would be nice if the client
FilePage.Upload
would support those as well.UploadResults
object has afileKey
which is good in order to get the file etc, but a full address to the file would be helpful too, as I guess in most cases people would use the link to present the image.The text was updated successfully, but these errors were encountered: