@tritor
Das sieht bei mir in JavaScript so aus
var fs = require('fs');
// strip off the data: url prefix to get just the base64-encoded bytes
var data = img.replace(/^data:image\/\w+;base64,/, "");
var buf = Buffer.from(data, 'base64');
var file = 'c:/tmp/' + cam + '.jpg';
fs.writeFile(file, buf, function(err) {
if (err) { console.error(err); }
else {
sendTo("pushover", {
message: cam + ': Person erkannt', // mandatory - your text message
title: 'ioBroker', // optional - your message's title, otherwise your app's name is used
sound: 'Magic', // optional - the name of one of the sounds supported by device clients to override the user's default sound choice
// pushover, bike, bugle, cashregister, classical, cosmic, falling,
// gamelan, incoming, intermission, magic, mechanical, pianobar, siren,
// spacealarm, tugboat, alien, climb, persistent, echo, updown, none
priority: 0, // optional (-2, -1, 0, 1, 2)
// -2 to always send as a quiet notification,
// 1 to display as high-priority and bypass the user's quiet hours, or
// 2 to also require confirmation from the user
file: file, // optional - attachment
// token: 'API/KEY token', // optional - add other than configurated token to the call
// url: , // optional - a supplementary URL to show with your message
// url_title: , // optional - a title for your supplementary URL, otherwise just the URL is shown
// device: , // optional - your user's device name to send the message directly to that device, rather than all of the user's devices
// timestamp // optional - a Unix timestamp of your message's date and time to display to the user, rather than the time your message is received by our API
}
}
});
img ist der Inhalt vom snapshot.
Gruß ExMatador