Images posted via the API embed as empty, do not display. #1952
AshGlidewell
started this conversation in
Bluesky Lexicons
Replies: 1 comment 2 replies
-
You need to upload the image as raw data, not as a base64 string. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there, started a new discussion instead of piggybacking off of someone else's question which doesn't seem to be entirely the same thing. I'm encountering a problem when sending posts with embeds and uploading blobs.
I've attached a few files.
This is the full payload of the image in Base64 along with the image
ImagePayload.txt
This is the JSON that I get back after uploading said image
{"blob":{"$type":"blob","ref":{"$link":"bafkreigfo6s7ajzqk4gpw3ntubmkcealhsw633jrpn2j3ak6tcqaw4bu4e"},"mimeType":"image/png","size":179595}}
This is the JSON that I send back to create the post with an embed:
This is the response I get back after sending that:
{"uri":"at://did:plc:7yovtpsbz3jfyzde2pjmkuig/app.bsky.feed.post/3kgc2k5zibc2a","cid":"bafyreihcl5if2j4dcsnfwl62puqnie2cgfqd6eaihc3atmgewiedgqq44i"}
What I'm trying to do is upload an image with a small body of text as the alt text, then embed that into a post.
I'm using the example I found here as a guide to making my own.
https://atproto.com/blog/create-post#images-embeds
Here is a post containing the result of the above:
https://bsky.app/profile/vndev.bsky.social/post/3kgc2k5zibc2a
I would hope that I would get an error if I'm submitting something incorrectly along the way, but this doesn't produce any errors, but it's also not working the way I expect it to. Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions