Initial attempt at modularizing CSP integration

This commit is contained in:
Patrick Smith
2018-12-18 11:00:59 -05:00
parent 442e136a4b
commit d6ff3406ef
5 changed files with 45 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ class Attachment(Base, mixins.TimestampsMixin):
@classmethod
def attach(cls, fyle, resource=None, resource_id=None):
try:
object_name = app.uploader.upload(fyle)
object_name = app.csp.files.upload(fyle)
except UploadError as e:
raise AttachmentError("Could not add attachment. " + str(e))