13 Dec
2002
13 Dec
'02
7:19 p.m.
On Fri, Dec 13, 2002 at 10:14:47AM -0800, Paul Winkler wrote:
On Fri, Dec 13, 2002 at 05:31:38PM +0100, Jerome Alet wrote:
create a Script (Python) object named itemcode in your root which contains only :
return context.getId().split('.')[-1]
that'll break the first time somebody uploads a file named "foo.bar.baz.html" ...
My fingers typed exactly the opposite of what I wanted to type it seems. I wanted to keep all but the last one, of course, so this is probably something more like this one : return '.'.join(context.getId().split('.')[:-1]) And I said this was completely untested IIRC. BTW this one is also completely untested hth Jerome Alet