From 351e9460c5a2215ba574374c37cde06f1ceb55a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Mon, 22 Jul 2013 17:00:12 +0200 Subject: [PATCH] =?utf8?q?On=20appelle=20(et=20on=20retourne)=20l'action?= =?utf8?q?=20=C2=AB=C2=A0jsupload=5Fsnippet=C2=A0=C2=BB=20apr=C3=A8s=20un?= =?utf8?q?=20PUT=20webdav.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Folder.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Folder.py b/Folder.py index c3ca6f7..db87868 100644 --- a/Folder.py +++ b/Folder.py @@ -325,7 +325,9 @@ class PlinnFolder(CMFCatalogAware, PortalFolder, DefaultDublinCoreImpl) : ob = self.PUT_factory(validId, typ, body) self._setObject(validId, ob) ob = self._getOb(validId) + httpRespCode = 201 else : + httpRespCode = 200 ob = self._getOb(validId) # We call _verifyObjectPaste with verify_src=0, to see if the @@ -340,10 +342,13 @@ class PlinnFolder(CMFCatalogAware, PortalFolder, DefaultDublinCoreImpl) : ob.PUT(REQUEST, RESPONSE) ob.orig_name = fileName - - RESPONSE.setStatus(201) - RESPONSE.setBody('') - return RESPONSE + + + ti = ob.getTypeInfo() + method_id = ti.queryMethodID('jsupload_snippet') + meth = method_id and getattr(ob, method_id) or (lambda : 'Not implemented') + RESPONSE.setStatus(httpRespCode) + return '' % meth() # ## overload to maintain ownership if authenticated user has 'Manage portal' permission -- 2.20.1