A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
remoteFile in compliments module
-
@Lahim said in remoteFile in compliments module:
IT IS WORKING!!!
Thank you so much!!!Fantastic! You’re welcome. :-)
-
Will you be able to find the solution to the problem I described above?
-
@Lahim because you changed the context by removing the arrow function, to preserve the context you have to do something like:
if (this.config.remoteFile != null) { var self = this; this.complimentFile(function(response){ self.config.compliments = JSON.parse(response); }); }
-
I found it in the meantime but now I tested it - yes, it works!!!
Thank you! -
has anyone tried to get the compliments in an file on a external Server?
-
I have not. By default, the compliments module looks for the compliments.json file in the compliments module folder. I suppose you could try using the path to the file on your server in your config entry
remoteFile: "PATH_TO_FILE_ON_SERVER/comliments.json",
Dunno if that will work though.