[Zope-CMF] Uploading news items with FTP

Jonathan Corbet corbet@lwn.net
Mon, 23 Apr 2001 14:47:18 -0600


> 	You might want to check out the end of the __init__.py in CMFDefault.
> There is where the 'types' for the PUT_factory are registered. You could do
> something similar in your __init__.py if you like. This would cause 'your'
> object to be created on the 'PUT' from FTP. I hope this helps.

I tried that, actually.  Didn't work.

First, it looks at the content-type header, such as it is, and not the
"Type:" field as described on the CMF site.  

The content-type "header" gets set way down deep in the Zope code -
essentially, it becomes text/html.  The core Zope code knows nothing about
news items, after all.  If I were to go into the MIME type dictionary and
make a ".news" file become text/newsitem or some such, I could probably
succeed in uploading news items by way of the stuff in
CMFDefault/__init__.py, but that, too, is a hack.  That doesn't look like
the way it was meant to be done in CMF.

But then, maybe I'm wrong, it certainly wouldn't be the first time.

Thanks,

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net