projects
/
Plinn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
On appelle (et on retourne) l'action « jsupload_snippet » après un PUT webdav.
[Plinn.git]
/
Folder.py
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