earthstar-project / earthstar

Storage for private, distributed, offline-first applications.
https://earthstar-project.org
GNU Lesser General Public License v3.0
637 stars 20 forks source link

Add a way to specify an attachment size limit during sync #288

Open sgwilym opened 1 year ago

sgwilym commented 1 year ago

What's the problem you want solved?

A syncing peer will always try to download attachments it doesn't have.

This isn't always desirable, e.g. the client may have constrained storage space.

It would be good to have a way to set an attachment size limit for sync operations, so that if an attachment over a given size is detected it is not downloaded.

Is there a solution you'd like to recommend?

Have some kind of configuration that is given when initiating a sync operation, and which the syncer checks each time it prepares to download an attachment.