[#1480 files containing text + colons appear as empty files when added to wiki via WebDAV]
[email protected] (coolestuk) Sat, 05 Mar 2011 08:54:19 -0800
| Newsgroups | gmane.comp.web.zope.zwiki |
|---|---|
| Message-ID | <20110305085413-0800__39638.4625383236$1299344073$gmane$org@zwiki.org> |
ZWiki 2.01b
Zope Version (Zope 2.11.8-final, python 2.4.6, linux2)
Python Version 2.4.6 (#1, Feb 11 2011, 00:00:26)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
Using the following PUT_factory to enable docs to be added via WebDAV.
# simple put_factory
from Products.ZWiki.ZWikiPage import ZWikiPage
def PUT_factory( self, name, typ, body ):
p=ZWikiPage('', __name__=name)
p.setPageType('plaintext')
return p
Files with a colon in the text do not register a problem on being added to the wiki via a webdav client (there is no error message on 'put'), but in the ZMI such files subsequently appear with a zero size, and when viewed via the ZWiki interface they are empty files.
When a file containing no colon is successfully loaded into the wiki via webdav, the text can be edited through the zwiki web interface and the colon added. After saving the changes, there is no problem with the file being displayed in the ZWiki interface, and in the ZMI the files shows up with a size.
--
forwarded from http://zwiki.org/1480FilesContainingTextColonsAppearAsEmptyFilesWhenAddedToWikiViaWebDAV#[email protected]