[CalendarServer-changes] [14935] CalendarServer/trunk/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 1 07:14:59 PDT 2015
Revision: 14935
http://trac.calendarserver.org//changeset/14935
Author: cdaboo at apple.com
Date: 2015-07-01 07:14:59 -0700 (Wed, 01 Jul 2015)
Log Message:
-----------
Cross-pod attachment calls need to return the stored attachment size.
Modified Paths:
--------------
CalendarServer/trunk/txdav/caldav/datastore/sql_external.py
CalendarServer/trunk/txdav/common/datastore/podding/attachments.py
Modified: CalendarServer/trunk/txdav/caldav/datastore/sql_external.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql_external.py 2015-06-30 20:04:25 UTC (rev 14934)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql_external.py 2015-07-01 14:14:59 UTC (rev 14935)
@@ -255,15 +255,15 @@
@inlineCallbacks
def addAttachment(self, rids, content_type, filename, stream):
result = yield self._txn.store().conduit.send_add_attachment(self, rids, content_type, filename, stream)
- managedID, location = result
- returnValue((ManagedAttachmentExternal(str(managedID)), str(location),))
+ managedID, size, location = result
+ returnValue((ManagedAttachmentExternal(str(managedID), size), str(location),))
@inlineCallbacks
def updateAttachment(self, managed_id, content_type, filename, stream):
result = yield self._txn.store().conduit.send_update_attachment(self, managed_id, content_type, filename, stream)
- managedID, location = result
- returnValue((ManagedAttachmentExternal(str(managedID)), str(location),))
+ managedID, size, location = result
+ returnValue((ManagedAttachmentExternal(str(managedID), size), str(location),))
@inlineCallbacks
@@ -279,12 +279,17 @@
L{CalendarObjectExternal.updateAttachment}.
"""
- def __init__(self, managedID):
+ def __init__(self, managedID, size):
self._managedID = managedID
+ self._size = size
def managedID(self):
return self._managedID
+ def size(self):
+ return self._size
+
+
CalendarExternal._objectResourceClass = CalendarObjectExternal
Modified: CalendarServer/trunk/txdav/common/datastore/podding/attachments.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/podding/attachments.py 2015-06-30 20:04:25 UTC (rev 14934)
+++ CalendarServer/trunk/txdav/common/datastore/podding/attachments.py 2015-07-01 14:14:59 UTC (rev 14935)
@@ -69,7 +69,7 @@
request["stream"],
)
- returnValue((attachment.managedID(), location,))
+ returnValue((attachment.managedID(), attachment.size(), location,))
@inlineCallbacks
@@ -115,7 +115,7 @@
request["stream"],
)
- returnValue((attachment.managedID(), location,))
+ returnValue((attachment.managedID(), attachment.size(), location,))
@inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150701/f893df88/attachment-0001.html>
More information about the calendarserver-changes
mailing list