[Zope-CMF] Uploading news items with FTP
Jonathan Corbet
corbet-cmf@lwn.net
Mon, 23 Apr 2001 14:08:06 -0600
I'm still working on how to upload news items with FTP. As far as I can
tell from my digging so far, it can't be done. I'd be overjoyed if
somebody told me otherwise...
If you look at http://cmf.zope.org/doc/user/BasicContent.txt/view, it says,
among other things:
the CMF checks the incoming data to see if it has a piece of metadata
called Type. The value of this metadata property would instruct the
CMF to create, for instance, a NewsItem.
But, as far as I can tell, that simply is not true. A couple of content
types (Document, NewsItem) use parseHeadersBody to grab metadata and set
things like the title, but that is done *after* the object has been
created. There is nothing, currently, which looks at headers before the
object is created.
So, even though NewsItem defines a PUT_factory method, nothing ever calls
it.
I could perhaps bash out a hacky solution in PortalFolder.PUT_factory that
would make things work. I get a sense, though, from the code that the
whole portal_types mechanism is intended to be used in this sort of role,
and I haven't done anywhere near enough time staring at the code to figure
out how I might make that happen...
Thoughts?
jon
Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net