Blob sharing support in new playground
The new playground does not support images or binary file sharing in collaboration. Paste an image on the playground will not be visible to other peers.
I am facing the same problem. Although not efficient, I considered converting the blob to base64 and treating it as a key, but that was impossible because the BlobEngine set appears to return a key, but it is not used at all. https://github.com/toeverything/blocksuite/pull/6937
Specifically, this page does not support image transfer.
@Flrande Do you have any ideas?
I am facing the same problem. Although not efficient, I considered converting the blob to base64 and treating it as a key, but that was impossible because the BlobEngine set appears to return a key, but it is not used at all. #6937
Specifically, this page does not support image transfer.
@Flrande Do you have any ideas?
BlockSuite Playground does not support Blob sharing for collaboration, as it is only meant for people to try out and debug. If you need to support the sharing of Blob resources, you'll need to implement your own BlobSource.
Thanks for the reply.
you'll need to implement your own BlobSource.
I understand that. Even if we implement that, it seems like the only way to implement it is to require an external storage server, is that correct?
=== update === If there is no other way now, I think I can support it without an external storage server at the expense of 1.3x the transfer volume by using the key returned by BlobSource and including the data in Base64 in the key, what do you think about that idea?
The following changes. https://github.com/satoren/blocksuite/commit/322d9b62c0a200bb4c0a51815de51bb4e292b1a8
I suggest having a server for storing Blob data, as transmitting it solely through Base64 may impose a significant burden on collaborative operations.
When I checked to see if the load was that high, I confirmed that the playground requires an additional 4 times the network bandwidth and CPU processing because it sends the yjs payload in a json array representation. This is certainly fatal.
Yes, the implementation of Playground is very simple. You can refer to the code of AFFiNE for actual production.
https://github.com/toeverything/AFFiNE/tree/canary/packages/common/infra/src/sync/doc