Page MenuHomePhabricator

Upload unknown error ``fileexists-forbidden''"
Closed, ResolvedPublic

Description

Author: M8R-udfkkf

Description:
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&#039;&#039;" 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"?


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz31777

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:53 PM
bzimport set Reference to bz31777.
bzimport added a subscriber: Unknown Object (MLST).

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

neilk wrote:

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.

neilk wrote:

(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 11800