Im trying to Zip some photos so that i can send them via email but when i zip them and then unzip them the unziped file corrupts. When i open it the message states "Error interpreting JPEG image file (Not a JPEG file: starts with 0x5b 0x7b)"
the flow pics up a file called image.jpeg in the "/home/pi" directory zips it, unzips it and puts it in a new directory called "/home/pi/zip test". I am using node-red-contrib-zip.
and here is my flow
[{"id":"a27182f4.ca77c","type":"tab","label":"zipper","disabled":false,"info":""},{"id":"5a0d2a4e.a060d4","type":"debug","z":"a27182f4.ca77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":260,"wires":},{"id":"92139b8.82aee68","type":"debug","z":"a27182f4.ca77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":40,"wires":},{"id":"b09e59c7.b428f8","type":"debug","z":"a27182f4.ca77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":180,"wires":},{"id":"17221885.a1abc7","type":"inject","z":"a27182f4.ca77c","name":"","topic":"","payload":"/home/pi/download.jpeg","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":40,"wires":[["952a442b.c8d498"]]},{"id":"952a442b.c8d498","type":"file in","z":"a27182f4.ca77c","name":"","filename":"/home/pi/image.jpeg","format":"","chunk":false,"sendError":false,"encoding":"none","x":200,"y":120,"wires":[["92139b8.82aee68","dea8bc60.3eeb9"]]},{"id":"31b9d52f.0d484a","type":"zip","z":"a27182f4.ca77c","name":"","mode":"compress","filename":"","outasstring":false,"x":470,"y":180,"wires":[["b09e59c7.b428f8","87659d82.c8c35"]]},{"id":"87659d82.c8c35","type":"zip","z":"a27182f4.ca77c","name":"","mode":"decompress","filename":"","outasstring":false,"x":470,"y":260,"wires":[["5a0d2a4e.a060d4","91bd587.f3b4da8"]]},{"id":"dea8bc60.3eeb9","type":"change","z":"a27182f4.ca77c","name":"","rules":[{"t":"change","p":"filename","pt":"msg","from":"/home/pi/","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":120,"wires":[["1285d75c.eac9e9","31b9d52f.0d484a"]]},{"id":"1285d75c.eac9e9","type":"debug","z":"a27182f4.ca77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":120,"wires":},{"id":"4662fda2.299904","type":"file","z":"a27182f4.ca77c","name":"","filename":"","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":470,"y":400,"wires":[["4fb57d60.efc264"]]},{"id":"4fb57d60.efc264","type":"debug","z":"a27182f4.ca77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":400,"wires":},{"id":"91bd587.f3b4da8","type":"change","z":"a27182f4.ca77c","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":""/home/pi/zip test/"& msg.filename","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":320,"wires":[["4662fda2.299904","5b2735b6.2ae2ec"]]},{"id":"5b2735b6.2ae2ec","type":"debug","z":"a27182f4.ca77c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":320,"wires":}]
can anyone advise why the file gets corrupted?