Community
Participate
Working Groups
After opening the Eclipse Paho MQTT Utility, we found that there was a bug when we used the Eclipse Paho MQTT Utility to publish the message when we selected a image file. The binary which was sent to the MQTT server was not the binary but the string format of binary. Meanwhile, the binary format is correct if we used the command which was provided by mosquitto using the below command, for example mosquitto_pub.exe -h 192.168.80.196 -p 1884 -f C:\temp\1.png -t test1
Created attachment 256609 [details] Eclipse Paho MQTT Utility issue
The behaviour isn't what I would expect either, I've had a look in the source, looks like the file reader simply tries to read the file as UTF-8 and if it fails, it reads the file in as a byte array but converts it to HEX. I propose that we add another Checkbox to the UI called 'Raw' that allows the user to choose between the file being sent as HEX or as a raw byte array (Which to me would be the expected behaviour) When the file is read in, we should keep it as the byte array internally and then only convert it to hex if the user ticks the box. Though we should keep the byte array in case they change their minds.
Created attachment 257977 [details] Mockup showing the raw check box
Migrated to GitHub Issue: https://github.com/eclipse/paho.mqtt.java/issues/22