https://bugzilla.wikimedia.org/show_bug.cgi?id=21210

           Summary: Upload API error message
           Product: MediaWiki
           Version: 1.16-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


I sent a POST request to https://secure.wikimedia.org/wikipedia/en/w/api.php
with the following (relevant) message headers and body; the ****'s indicate
where I have obscured or omitted content that shouldn't affect this issue:

Content-Type: multipart/form-data
boundary="===============0637518620=="
MIME-Version: 1.0

--===============0637518620==
Content-Type: text/plain
MIME-Version: 1.0
Content-disposition: form-data; name="maxlag"

5
--===============0637518620==
Content-Type: text/plain
MIME-Version: 1.0
Content-disposition: form-data; name="format"

json
--===============0637518620==
Content-Type: text/plain
MIME-Version: 1.0
Content-disposition: form-data; name="filename"

Testpage1.gif
--===============0637518620==
Content-Type: text/plain
MIME-Version: 1.0
Content-disposition: form-data; name="token"

6e09************************e48a+\
--===============0637518620==
Content-Type: image/gif
MIME-Version: 1.0
Content-disposition: form-data; name="file"

GIF89a2****  lots of 16-bit data deleted  ****;
--===============0637518620==
Content-Type: text/plain
MIME-Version: 1.0
Content-disposition: form-data; name="action"

upload
--===============0637518620==--

The API returned the error message:

{"error":
    {"code": "missingparam",
     "info": "One of the parameters sessionkey, file, url, enablechunks is
required"
    }
}

The parameter "file" actually was present in the input, so the error message is
inexplicable.  Clearly, something is wrong but I cannot tell whether it is in
the server or the client.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to