Last modified: 2012-04-21 17:08:04 UTC
When you upload using the chunk-feature and set stash=1 (or whatever) and then try to publish the file, only the contents or the first chunk are published. In the next post, I will show the problem. You can easily see it in the results: The filesize of the upload is size="5402673" before publishing and size="1048576" after publishing. I think one could simply ignore the stash parameter if chunk contents are set.
The response log. Note the last two entries. RESP: <?xml version="1.0"?><api><upload result="Warning" filekey="10ggun4v5dg0.8yhpgo.1560811.jpg" sessionkey="10ggun4v5dg0.8yhpgo.1560811.jpg"><warnings badfilename="Rillketest6.jpg" /></upload></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Continue" filekey="10ggunxpykd4.b3svbl.1560811.jpg" offset="1048576" /></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Continue" filekey="10ggunxpykd4.b3svbl.1560811.jpg" offset="2097152" /></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Continue" filekey="10ggunxpykd4.b3svbl.1560811.jpg" offset="3145728" /></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Continue" filekey="10ggunxpykd4.b3svbl.1560811.jpg" offset="4194304" /></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Continue" filekey="10ggunxpykd4.b3svbl.1560811.jpg" offset="5242880" /></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Success" filekey="10ggunxpykd4.b3svbl.1560811.jpg" offset="5402673"><imageinfo timestamp="2012-03-28T13:41:52Z" user="" userid="" anon="" size="5402673" width="2009" height="3792" parsedcomment="" comment="" url="http://commons.wikimedia.org/wiki/Special:UploadStash/file/10ggura4shq0.ls3k8q.1560811.jpg" descriptionurl="http://commons.wikimedia.org/wiki/Special:UploadStash/file/10ggura4shq0.ls3k8q.1560811.jpg" sha1="677b32e584b9c3965d45f8c65e974deda30c6213" mime="image/jpeg" mediatype="UNKNOWN" bitdepth="0"><metadata><metadata name="Make" value="FUJIFILM" /><metadata name="Model" value="FinePix S1800" /><metadata name="Orientation" value="1" /><metadata name="XResolution" value="72/1" /><metadata name="YResolution" value="72/1" /><metadata name="ResolutionUnit" value="2" /><metadata name="Software" value="Digital Camera FinePix S1800 Ver1.04" /><metadata name="DateTime" value="2011:08:20 17:57:20" /><metadata name="YCbCrPositioning" value="2" /><metadata name="Exposur eTime" value="10/1800" /><metadata name="FNumber" value="640/100" /><metadata name="ExposureProgram" value="2" /><metadata name="ISOSpeedRatings" value="64" /><metadata name="ExifVersion" value="0220" /><metadata name="DateTimeOriginal" value="2011:08:20 17:57:20" /><metadata name="DateTimeDigitized" value="2011:08:20 17:57:20" /><metadata name="ComponentsConfiguration"><value><metadata name="0" value="1" /><metadata name="1" value="2" /><metadata name="2" value="3" /><metadata name="3" value="0" /><metadata name="_type" value="ol" /></value></metadata><metadata name="CompressedBitsPerPixel" value="40/10" /><metadata name="ShutterSpeedValue" value="750/100" /><metadata name="ApertureValue" value="535/100" /><metadata name="BrightnessValue" value="849/100" /><metadata name="ExposureBiasValue" value="0/100" /><metadata name="MaxApertureValue" value="326/100" /><metadata name="MeteringMode" value="5" /><metadata name="LightSource" value="1" /><metadata name="Flash" value="16" /><metadata name="FocalLength" valu e="500/100" /><metadata name="FlashPixVersion" value="0100" /><metadata name="ColorSpace" value="1" /><metadata name="FocalPlaneXResolution" value="6494/1" /><metadata name="FocalPlaneYResolution" value="6494/1" /><metadata name="FocalPlaneResolutionUnit" value="3" /><metadata name="SensingMethod" value="2" /><metadata name="FileSource" value="3" /><metadata name="SceneType" value="1" /><metadata name="CustomRendered" value="0" /><metadata name="ExposureMode" value="0" /><metadata name="WhiteBalance" value="1" /><metadata name="SceneCaptureType" value="0" /><metadata name="Sharpness" value="2" /><metadata name="SubjectDistanceRange" value="0" /><metadata name="MEDIAWIKI_EXIF_VERSION" value="2" /></metadata></imageinfo></upload></api> ------------- RESP: <?xml version="1.0"?><api><upload result="Success" filename="Rillketest6_n.jpg"><imageinfo timestamp="2012-03-28T13:41:53Z" user="RillkeBot" userid="1560811" size="1048576" width="2009" height="3792" parsedcomment="Bot: Testing upload." comment="Bot: Testing upload." url="http://upload.wikimedia.org/wikipedia/commons/c/c7/Rillketest6_n.jpg" descriptionurl="http://commons.wikimedia.org/wiki/File:Rillketest6_n.jpg" sha1="1c0b8dcfe05c34c0d5c359db9827f7f60a70f57e" mime="image/jpeg" mediatype="BITMAP" bitdepth="8"><metadata><metadata name="Make" value="FUJIFILM" /><metadata name="Model" value="FinePix S1800" /><metadata name="Orientation" value="1" /><metadata name="XResolution" value="72/1" /><metadata name="YResolution" value="72/1" /><metadata name="ResolutionUnit" value="2" /><metadata name="Software" value="Digital Camera FinePix S1800 Ver1.04" /><metadata name="DateTime" value="2011:08:20 17:57:20" /><metadata name="YCbCrPositioning" value="2" /><metadata name="ExposureTime" value="10/1800" /><metadata name ="FNumber" value="640/100" /><metadata name="ExposureProgram" value="2" /><metadata name="ISOSpeedRatings" value="64" /><metadata name="ExifVersion" value="0220" /><metadata name="DateTimeOriginal" value="2011:08:20 17:57:20" /><metadata name="DateTimeDigitized" value="2011:08:20 17:57:20" /><metadata name="ComponentsConfiguration"><value><metadata name="0" value="1" /><metadata name="1" value="2" /><metadata name="2" value="3" /><metadata name="3" value="0" /><metadata name="_type" value="ol" /></value></metadata><metadata name="CompressedBitsPerPixel" value="40/10" /><metadata name="ShutterSpeedValue" value="750/100" /><metadata name="ApertureValue" value="535/100" /><metadata name="BrightnessValue" value="849/100" /><metadata name="ExposureBiasValue" value="0/100" /><metadata name="MaxApertureValue" value="326/100" /><metadata name="MeteringMode" value="5" /><metadata name="LightSource" value="1" /><metadata name="Flash" value="16" /><metadata name="FocalLength" value="500/100" /><metadata name="FlashPixV ersion" value="0100" /><metadata name="ColorSpace" value="1" /><metadata name="FocalPlaneXResolution" value="6494/1" /><metadata name="FocalPlaneYResolution" value="6494/1" /><metadata name="FocalPlaneResolutionUnit" value="3" /><metadata name="SensingMethod" value="2" /><metadata name="FileSource" value="3" /><metadata name="SceneType" value="1" /><metadata name="CustomRendered" value="0" /><metadata name="ExposureMode" value="0" /><metadata name="WhiteBalance" value="1" /><metadata name="SceneCaptureType" value="0" /><metadata name="Sharpness" value="2" /><metadata name="SubjectDistanceRange" value="0" /><metadata name="MEDIAWIKI_EXIF_VERSION" value="2" /></metadata></imageinfo></upload></api>
Perhaps one line of documentation about this would have saved me half a day.... (because you look for the errors at your side first)
Haha, even without setting stash it lead to truncated files. Again, IF YOU OFFER A SERVICE, IT SHOULD WORK OR ADD A WARNING THAT IT MIGHT FAIL! Next two hours wasted. Tested also with UpWiz setting mw.UploadWizard.config['enableChunked']=true
Fixed in Gerrit:4544 ?
Yes, that should have fixed it.