fraction / oasis

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).
http://oasis-demo.fraction.io
GNU Affero General Public License v3.0
286 stars 42 forks source link

Blob metadata in messages #604

Open clehner opened 3 years ago

clehner commented 3 years ago

What's the problem you want solved?

Posts and about messages are currently not including the size or content type of linked blobs. This means a user or application doesn't know how large a linked blob is before fetching it, and in some cases doesn't know the type of the blob (although that can often be inferred from the filename, or inferred broadly from the context).

Is there a solution you'd like to recommend?

Include the blob size and type, when known, in mention objects (objects in the mentions array of a post) and when setting a profile picture (the image property of an about message). When a file is uploaded, the browser may provide the file's content type. Otherwise it could be detected using the file command, or using some modules, or just omitted. The size can be detected using blobs.size.