mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
make exif node add exif data even if gps missing (#393)
This commit is contained in:
parent
032a9d6435
commit
29694dd2cb
@ -73,13 +73,17 @@ module.exports = function(RED) {
|
||||
node.log(error.toString());
|
||||
}
|
||||
else {
|
||||
//msg.payload remains the same buffer
|
||||
if ((exifData) && (exifData.hasOwnProperty("gps")) && (Object.keys(exifData.gps).length !== 0)) {
|
||||
if (exifData) {
|
||||
msg.exif = exifData;
|
||||
addMsgLocationDataFromExifGPSData(msg);
|
||||
if((exifData.hasOwnProperty("gps")) && (Object.keys(exifData.gps).length !== 0)) {
|
||||
addMsgLocationDataFromExifGPSData(msg);
|
||||
}
|
||||
else {
|
||||
node.log("The incoming image did not contain Exif GPS data.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
node.warn("The incoming image did not contain Exif GPS data, nothing to do. ");
|
||||
node.warn("The incoming image did not contain any Exif data, nothing to do. ");
|
||||
}
|
||||
}
|
||||
node.send(msg);
|
||||
|
Loading…
Reference in New Issue
Block a user