How to specify attachment metadata #1445
Unanswered
Techie007L
asked this question in
Q&A
Replies: 1 comment 1 reply
-
signal-cli doesn't support specifying the width/height yet. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I send attachment metadata along with an attachment? I have tried the command below, but it fails with an error:
signal-cli.bat -u +1********** send -a "data:image/jpeg;filename=C:\BlueIris\camera.jpg;width=1920;height=1080" -m "Message text" +1**********
Failed to send message: data:image/jpeg;filename=C:\BlueIris\camera.jpg;width=1920;height=1080: data:image\jpeg;filename=C:\BlueIris\camera.jpg;width=1920;height=1080 (The filename, directory name, or volume label syntax is incorrect) (AttachmentInvalidException)
The reason the metadata is needed is because the Android Signal app displays the image incorrectly (as a cropped square) when the image dimensions are not sent along with the message (interestingly, this does not appear to affect the iOS Signal app). But I need to be able to see the whole image! To verify the issue, I have sent images to a signal-cli instance from my phone (which display correctly) and from another signal-cli instance (which display incorrectly). This is what comes back when sent from an Android phone:
{"jsonrpc":"2.0","method":"receive",..."attachments":[{"contentType":"image/jpeg", "filename":null,"id":"E29Z1UvLrOrY217Lmvfu.jpg","size":778547, "width":2048,"height":1158,"caption":null,"uploadTimestamp":1707229754769}]...
And here is what comes back when sent from Signal-CLI:
{"jsonrpc":"2.0","method":"receive",..."attachments":[{"contentType":"image/jpeg", "filename":"camera.jpg","id":"2062722308171024073.jpg","size":219466, "width":null,"height":null,"caption":null,"uploadTimestamp":1707231513596}]...
The first message (sent by Signal Android) displays correctly, showing the entire 16:9 image. But the second message (sent from Signal-CLI) displays incorrectly, cropping a 1:1 square out of the middle of the image. As you can see, the first one includes the image dimension metadata, whereas the second one has "null" instead. I need to be able to specify the image dimensions when sending an attachment with signal-cli so the image appears correctly when received on Android! How do I accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions