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.
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
andtype
, when known, in mention objects (objects in thementions
array of a post) and when setting a profile picture (theimage
property of anabout
message). When a file is uploaded, the browser may provide the file's content type. Otherwise it could be detected using thefile
command, or using some modules, or just omitted. The size can be detected usingblobs.size
.