-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adds a Blob server for getting teh blobs #2
base: master
Are you sure you want to change the base?
Conversation
async in which sense? They it waits until the blob is received? There is a event-emitter like system on the blobstore that can be used for this but it needs to be wired up by hand right now.
|
this way the error is swallowed if the listen fails
using BlobsGet() bufferes a lot of data on the go sidem, which is supposed to be passed across the language barrier. Internally we don't want to copy all that into RAM, this uses the reader from blobs.Get and copys it into the http response directly without buffering. The blobstore.Changes() observable is hooked into to wait if the blob isn't available yet.
i made some polish and also fixed the imports since you did the github move (did not update the deps though and also commited a patch with the diffs from upstream on go-ssb) this should work and wait for the blob, for 30 seconds at least. |
} | ||
|
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.
might want to add some Content-Length or mime types here but it should still work.
need to close the listener if we want to restart the bot
a92fb43 takes care of ssbc/go-ssb#30 and fixes the formatting of the error that came up in sunrise-choir/sunrise-social-android-app#2 (comment) 27651c8 makes sure the listener for the http server is freed in |
Adds a really basic http server for getting blobs
It does actually work on the app, I've seen images in posts now which is 🍰 🎉 🎈
@cryptix at some point we talked about being able to make an async version of the
blobstore.Get
function. I can't remember if it was hard or not. If it's easy, how to do it?