XZise added a comment.

In https://phabricator.wikimedia.org/T106412#1556591, @abian wrote:

> In https://phabricator.wikimedia.org/T106412#1555560, @XZise wrote:
>
> > - When the file extension is invalid it asks you if you want to continue or 
> > change the name. What should `-always` do?
>
>
> What does 'invalid' mean?
>
> - The source file extension does not match the content, but the destination 
> file extension does → upload
> - The destination file extension does not match the content → not to upload 
> (if implemented)
> - The destination file extension is not supported by the project → not to 
> upload
> - The destination file name has no extension → not to upload


Invalid as in not recognized 
<https://commons.wikimedia.org/w/api.php?action=query&meta=siteinfo&siprop=fileextensions>.
 As we don't compare it with the content the first two option is not valid.

> > - When the file already exists it asks you if you want to continue or 
> > change the name. What should `-always` do?

> 

> 

> In my opinion, this should be configured by another option (for example, 
> `-ignorewarn`, or a new one, `-overwrite`). Without these possible options, 
> `-always` should not upload.


Unfortunately `-ignorewarn` has already a meaning so I don't think we can use 
that. But yeah maybe `-overwrite` instead.

> Okay. Is there any case which has not been mentioned above?


I don't think so. Unfortunately test the script is quite complicated because as 
soon as you uploaded a file the server will behave differently when you upload 
the file again. I'd appreciate when you were able to test it. I should have a 
patch available soonish.


TASK DETAIL
  https://phabricator.wikimedia.org/T106412

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: XZise
Cc: -jem-, Mr.Ajedrez, XZise, Aklapper, abian, pywikibot-bugs-list, jayvdb, 
Malyacko



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to