fix for sending image attachment

This commit is contained in:
liamcottle
2024-05-05 11:23:44 +12:00
parent 02e62c3a3e
commit cdd2999a6f

View File

@@ -653,7 +653,8 @@
// add image attachment
if(this.newMessageImage){
fields["image"] = {
"image_type": this.newMessageImage.type,
// Reticulum sends image type as "jpg" or "png" and not "image/jpg" or "image/png"
"image_type": this.newMessageImage.type.replace("image/", ""),
"image_bytes": this.arrayBufferToBase64(await this.newMessageImage.arrayBuffer()),
};
}