[Zope] Very Strange FTP upload bug!

Matthew T. Kromer matt@zope.com
Fri, 01 Feb 2002 09:08:16 -0500


Adam Warner wrote:

>On Sat, 2002-02-02 at 01:13, Chris Withers wrote:
>
>>Adam Warner wrote:
>>
>>>426 Error creating file.
>>>
>>>If I edit the file and replace every '<' with an '_' then I can upload
>>>it!
>>>
>>Sounds like your file is being uploaded into a DTML method which the DTML parser
>>doesn't like. I'm sure someone had patches to make this error message more
>>useful, I just don't know where they went :-S
>>
>>If someone can dig the patches up, I'd be happy to integrate them...
>>
>
>Chris, I think the issue is deeper than just a more informative error
>message.
>
>If I can't robustly upload files to a zope database using FTP then I may
>have to reevaluate this specific use of zope. All I uploaded was some
>HTML source. If zope can't cope with that then I can't easily use it to
>archive HTML source material.
>
>If I was uploading to a filesystem this problem wouldn't arise. Sure I'd
>still have an issue about serving the correct MIME type but I could
>solve that using Apache defaults.
>
>It appears that Zope's trying to be too clever. Textual content should
>be able to be uploaded via FTP. Not rejected because of an overly
>exuberant DTML parser.
>
>Regards,
>Adam
>

The automatic type determination of the document sets what the object is 
when you do an upload.  Some folks are adding features to use extensions 
to help recognize types by intent.  However, if you upload something 
that looks HTML-like, it will probably be converted to a DTML document 
-- at this stage, you probably want a page template instead.  You can 
append ".pt" to the name and it should be stored as a page template 
(unless I dont know what I'm talking about, which is probability 0.5).