Last modified: 2012-07-01 18:59:27 UTC
Created attachment 9246 [details] the upload request When uploading a copy of an image to its filename on the commons, I got the following response: ?xml version="1.0"?><api servedby="mw69"><error code="unknownerror" info="Unknown error: ``fileexists-forbidden''" filekey="102lku9iniz8.mnvurj.1695519.gif" sessionkey="102lku9iniz8.mnvurj.1695519.gif" invalidparameter="filename" /></api> Why is this an unkown error..and why does it give invalidparameter="filename"?
UploadBase::checkOverwrite gives this as error and the gui is than showing the message with the key 'fileexists-forbidden' and the parameter, but the api does not know this key in the ApiBase::$messageMap and than the key error is unknown.
Also: fileexists-shared-forbidden with $1
I'm assuming that you were using UploadWizard? How were you able to upload an image to the same filename? It should have thrown an error on the filename alone before you were able to upload it. In any case, the use case of "uploading over existing filename" is a common practice on Commons, but it's very weird and unintuitive to others, the vast majority of cases are people mistakenly uploading over an existing filename. So if you need to reupload, go to the image page in question, and do it from there.
I don't think we should necessarily assume all uses of uploading via API is upload wizard related - There could be third party people using the API to upload stuff, potentially using it to upload over same file name.
(In reply to comment #4) > I don't think we should necessarily assume all uses of uploading via API is > upload wizard related - There could be third party people using the API to > upload stuff, potentially using it to upload over same file name. You're right, I misread it. Sorry.
a patch commited with Gerrit change #11800
successfully merged