Topic on Extension talk:MsUpload/Flow

Error after upgrading 13.4 to 13.5

10
Megajoule (talkcontribs)

MW 1.35.4

When I try to upload, I get either :

  • a correct upload (which is rare)
  • Error: Unknown error
  • File extension ".gif" does not match the detected MIME type of the file (image/jpeg) (if I try to upload a jpg and I successfully uploaded a gif before)
Antoniobarijo (talkcontribs)

I also got in 1.38 while drag and drop.

  • Error: Unknown error
William Surya Permana (talkcontribs)

I got this issue too.

Sometimes, MSUpload POST to the API, but without any "action" parameter, only "name" and "file", like this:

-----------------------------xxx
Content-Disposition: form-data; name="name"

<File name of the current upload>
-----------------------------xxx
Content-Disposition: form-data; name="file"
Content-Type: image/png

<Binary data of the current upload>

Since there is no action, that API will return the documentation in HTML format instead. MSUpload can't handle non-JSON responses, so it will throw "Error: unknown error".

After the error if I'm not mistaken, sometimes MSUpload will retry the failed upload. It will correctly send the "action" param this time along with the "file" of the previous file.

BUT (this is the important part!), somehow it will also merge the request with the snippet above. Both "name" and (another) "file" param is based on the next file.

Something like this:

-----------------------------xxx
Content-Disposition: form-data; name="filename"

<File name of the previous error upload>
-----------------------------xxx
Content-Disposition: form-data; name="action"

upload
-----------------------------xxx
Content-Disposition: form-data; name="file"
Content-Type: image/png

<Binary data of the previous error upload>
-----------------------------xxx
Content-Disposition: form-data; name="name"

<File name of the next file>
-----------------------------xxx
Content-Disposition: form-data; name="file"
Content-Type: image/png

<Binary data of the next file>

"Name" param is not needed by the upload API, and only the last binary data is taken.

The result: Binary data of the next file + file name of the previous error upload.

When there are 2 files, A and B, probably A is not uploaded, and B is uploaded with A filename. Or, A is uploaded, and B will be uploaded again replacing the A file. The filename is off by one file sequentially.

But when there are more files, let's say A, B, C, D, E, and encountered are a lot of errors, It's even possible that E will be uploaded using A filename.

184.103.82.6 (talkcontribs)

That's exactly what is happening to me: Files are getting uploaded with other file's names.

Pneuma01 (talkcontribs)
2603:6010:3001:AA25:0:0:0:1014 (talkcontribs)

I am having this same issue, it just says there is an error but does not specify what kind of error. I can find no errors in Apache's log either.

2A01:E0A:374:41C0:314F:EBA3:82A1:4AB6 (talkcontribs)

With M 1.38 and MSUpload 13.5 the first file dropped is always "unkown errror".

77.72.193.34 (talkcontribs)

Use MSUpload 13.3 ( REL1_37): seems to work

Kaya8422 (talkcontribs)

Try with this and let me know if it work:

github.com/Kaya84/mediawiki-extensions-MsUpload

88.116.170.254 (talkcontribs)

I had the same problem, the fix from @Kaya8422 works!

Reply to "Error after upgrading 13.4 to 13.5"