-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
[ntfy] Support for attaching/uploading local files #866
Comments
Is the problem the file attachments, or just the encoding if utf-8 when there is an attachment present (forcing use if http headers)? In the first reference you shared, there was a suggestion that the headers in question (body/title) were encoded. This might reduce the number of characters that a ntfy message can have though. Another way of doing it would be to leverage |
The ntfy API was meant to be simple simple simple, especially when using with There is a proposal for an extension of the ntfy API to also support multipart messages (binwiederhier/ntfy#69 (comment), see case 4), but I struggled a bit implementing this so I stopped. Another option was to encode the headers using RFC 2047, e.g. |
Hi Chris and Philipp,
a) We needed to use local file attachments, i.e. uploading them using the HTTP body, and the Apprise ntfy adapter does not support that (yet). b) Correct. When using this communication style, and an attachment is present, it will currently not work to use the UTF-8 character set to represent textual notification contents in all the other fields ntfy supports.
I absolutely appreciated that, it was a pleasure to work with the ntfy HTTP API. Kudos for designing it.
That would be so sweet, indeed! I will be happy to adjust mqtt-tools/mqttwarn#638 accordingly, and, if @caronc will consider this communication style could also be a candidate to make Apprise support ntfy with uploaded attachments, I am sure he will be happy to hear that there are no drawbacks any longer 1. With kind regards, Footnotes
|
Dear Chris, thank you for chiming in at mqtt-tools/mqttwarn#638 (comment), I appreciate it. My intentions have been humble, in order to improve the different client-side implementations for ntfy I've investigated - see also vict0rsch/ntfy-wrapper#8.
The
I mentioned that detail over at mqtt-tools/mqttwarn#638 (comment), right. However, adding a field called I hope this can clarify any potential confusion my ramblings may have created. Otherwise, don't hesitate to ask if something is not clear yet. With kind regards, |
I believe i can close this ticket off as attachments work fine via Ntfy and Apprise? This was especially improved with #892 . |
I think this is done/handled, if not with apprise-api/#118 then definitely with the link above? Closing off unless further discussion is warranted, i'll re-open 🚀 |
💡 The Idea
Dear Chris and Philipp,
over at mqttwarn, we used to use Apprise to submit notifications to ntfy, which worked great. However, because we wanted to have better control within mqttwarn, we are adding a dedicated mqttwarn ntfy adapter now, see mqttwarn ntfy adapter documentation.
However, it would be sweet if the Apprise ntfy adapter could also gain another feature which was important to us, namely to attach/upload local files, so we wanted to leave a corresponding note here.
The general approach we took is, in order to support the corresponding ntfy HTTP API interface, to submit all textual content via HTTP headers, because the HTTP body will be needed to transport the attachment file. This has the drawback that no UTF-8 messages can be submitted, because HTTP headers are only safe for ASCII / Latin-1.
For this reason, and probably for other reasons related to the character of Apprise, support for this feature may not be suitable at all. If you think this is the case, feel free to close the ticket right away.
With kind regards,
Andreas.
/cc @caronc, @binwiederhier
References
ntfy
mqtt-tools/mqttwarn#638The text was updated successfully, but these errors were encountered: