Description

It seems not be possible to upload files less than 1K onto this wiki here.

Steps to reproduce

Try to upload a file with a filesize less than 1K.

Example

Component selection

Details

MoinMoin Version

1.6 / 1.7 development branches from May 2008

Workaround

hg pull -u

Discussion

Obviously FieldStorage behaves different for uploads < 1KB. In that case, it doesn't give a file instance and also not a str (I didn't check, but likely it is a (c)StringIO instance).

The code now uses a duck typing approach now and just checks if the object has .read attribute and if yes, it is treated like a file, else if it is a str, it is treated like a str and in any other case a error is logged and a exception raised.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/AttachmentUploadTooSmall (last edited 2008-05-16 22:54:23 by ThomasWaldmann)