a basic in-editor image uploader like GH has.
flow#
- user drag&drop or paste an image to textarea.
- instantly insert placeholder
<!-- Uploading "image.png"... --> - uploads the images to user PDS, get blob cid.
- convert the inserted placeholder to actual uri:
. (more on this below)
afaik this is exactly how GH editor works.
PDS has a garbage collection logic so directly uploading images before submitting the issue should be fine.
blob uri format#
embedding com.atproto.sync.getBlob endpoint is not ideal because PDS host might change. So we will store image with custom blob+at://did:plc:user/{blob cid} uri.

will be rendered as
<img alt="image" src="https://pds.user.com/com.atproto.sync.getBlob?did=did:plc:user&cid=aaabbbccc" />
or with camo:
<img alt="image" src="https://camo.tangled.sh/hash" />
implementation#
To reuse same editor for pulls or comments, this will be implemented as web component. I'm not sure if I want to maintain it from separate repository like actor-typeahead yet.