projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c921c5b
)
On appelle (et on retourne) l'action « jsupload_snippet » après un PUT webdav.
author
Benoît Pin
<pin@cri.ensmp.fr>
Mon, 22 Jul 2013 15:00:12 +0000
(17:00 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Mon, 22 Jul 2013 15:00:12 +0000
(17:00 +0200)
Folder.py
patch
|
blob
|
history
diff --git
a/Folder.py
b/Folder.py
index
c3ca6f7
..
db87868
100644
(file)
--- 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)
ob = self.PUT_factory(validId, typ, body)
self._setObject(validId, ob)
ob = self._getOb(validId)
+ httpRespCode = 201
else :
else :
+ httpRespCode = 200
ob = self._getOb(validId)
# We call _verifyObjectPaste with verify_src=0, to see if the
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
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 '<![CDATA[%s]]>' % meth()
# ## overload to maintain ownership if authenticated user has 'Manage portal' permission
# ## overload to maintain ownership if authenticated user has 'Manage portal' permission