-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receive and save the latest media files. #30
Receive and save the latest media files. #30
Conversation
Receive and save the latest media files. Creating the folder "tmp/< nameAdapter_ [index] >"
I had a look into it. I personally would prefer that the directory for storage can be configured via an adapter config option like for other adapters. So allow absolute path's and all relative path should be automatically relative to "iobroker-data" directory. Can you change that please that way? Thank you for your contribution. You can check iobroker.history for the "path-logic" and how to get the path |
Okay, I'll add the ability to change the path to the folder. |
Why temp?! use pushover-media or such? :-) |
I planned to store only the last received files from telegrams. Do you want to use adapter.telegram to send and store media files? |
I have no need at all for medias (currently), only thoughtabout possible usage. |
The last files are overwritten each time. |
main.js
Outdated
bot.getFileLink(file_id).then(function (url) { | ||
adapter.log.debug('Received message: ' + url); | ||
https.get(url, function (res) { | ||
if (res.statusCode == 200) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (res.statusCode === 200)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected the mistake
io-package.json
Outdated
"type": "state", | ||
"common": { | ||
"role": "text", | ||
"name": "Users as json, which are constantly authenticated", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? Is the name right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected the mistake
Saving to a folder of media files
No description provided.