[zope2-tracker] [Bug 1073875] [NEW] PUT_factory: __name__ ignored (Problem with non-ascii chars)

Georg Pfolz georg.pfolz at invesy.at
Thu Nov 1 10:22:37 UTC 2012


Public bug reported:

Why it's needed:

It's a big issue with filenames that contain non-ascii characters, like
German umlauts. When trying to upload them, it raises an error:
BadRequest: The id "Täst.png" contains characters illegal in URLs.

Problem description:

When uploading a file via FTP and using a PUT_factory, the __name__ I provide is ignored. 
code in the factory, i.e.: ob= Image(name, '', body, content_type=typ)

I tried using a custom class and I'm setting the __name__ and id of the newly created object in the __init__ method of its class. However this is completely ignored. For debugging purposes, I raised an exception in the last line of my __init__:
raise Exception, self.id

This gives me the correct newly created id. But it raises the error
nonetheless, so I guess it is overwritten when the file is uploaded to
the object. manage_afterAdd is not called.

** Affects: zope2
     Importance: Undecided
         Status: New


** Tags: ftp non-ascii put-factory

-- 
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
https://bugs.launchpad.net/bugs/1073875

Title:
  PUT_factory: __name__ ignored (Problem with non-ascii chars)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zope2/+bug/1073875/+subscriptions


More information about the zope2-tracker mailing list