-
-
Notifications
You must be signed in to change notification settings - Fork 70
Sending text file attachment using JSON #208
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
Comments
I can send attachments using curl POST URL string in a shell scrip as a testt:
Can this be done by sending a JSON string instead? |
Using {
"title": "Title",
"body": "Body",
"type": "info",
"format": "text",
"attachments": [
{
"filename": "filename.txt",
"base64": "<base64>"
"mimetype": "plain/text"
}
]
} If you have more than one attachment, you can chain them. But the easiest way is to just send the files along with the payload. Especially if you're using # Send a notification with an attachment:
curl -X POST \
-F 'urls=mailto://user:pass@gmail.com' \
-F 'body=test message' \
-F attach=@Screenshot-1.png \
http://localhost:8000/notify
# Send multiple attachments; just make sure the attach keyword is unique:
curl -X POST \
-F 'urls=mailto://user:pass@gmail.com' \
-F 'body=test message' \
-F attach1=@Screenshot-1.png \
-F attach2=@/my/path/to/Apprise.doc \
http://localhost:8000/notify |
Closing this ticket off having not heard any further response. |
❓ Question
Is sending attachments using JSON supported? I want to send a text file (log file) using the JSON POST method. I have tried base64 encoding the file but can't get it to work.
The text was updated successfully, but these errors were encountered: