-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axon upload/download HTTP APIs #1817
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1817 +/- ##
==========================================
+ Coverage 86.81% 96.21% +9.39%
==========================================
Files 139 139
Lines 27053 27107 +54
==========================================
+ Hits 23487 26080 +2593
+ Misses 3566 1027 -2539
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1817 +/- ##
==========================================
- Coverage 96.23% 96.18% -0.06%
==========================================
Files 139 139
Lines 27088 27140 +52
==========================================
+ Hits 26068 26104 +36
- Misses 1020 1036 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
synapse/axon.py
Outdated
@@ -169,6 +236,10 @@ async def _initBlobStor(self): | |||
self.blobs = self.blobslab.initdb('blobs') | |||
self.onfini(self.blobslab.fini) | |||
|
|||
def _initAxonHttpApi(self): | |||
self.addHttpApi('/api/v1/axon/files', AxonFilesHttpV1, {'cell': self}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to leave some wiggle room api/v1/axon/files/put
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the endpoint, and also allow calling with POST or PUT.
synapse/axon.py
Outdated
@@ -169,6 +236,10 @@ async def _initBlobStor(self): | |||
self.blobs = self.blobslab.initdb('blobs') | |||
self.onfini(self.blobslab.fini) | |||
|
|||
def _initAxonHttpApi(self): | |||
self.addHttpApi('/api/v1/axon/files', AxonFilesHttpV1, {'cell': self}) | |||
self.addHttpApi('/api/v1/axon/files/(.*)', AxonFileHttpV1, {'cell': self}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similarly api/axon/v1/files/by/sha256/
and we could tighten down the regex too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Co-authored-by: invisig0th <[email protected]>
No description provided.