Skip to content
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

Sending text file attachment using JSON #208

Open
ilium007 opened this issue Sep 8, 2024 · 1 comment
Open

Sending text file attachment using JSON #208

ilium007 opened this issue Sep 8, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ilium007
Copy link

ilium007 commented Sep 8, 2024

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.

@ilium007 ilium007 added the question Further information is requested label Sep 8, 2024
@ilium007
Copy link
Author

ilium007 commented Sep 8, 2024

I can send attachments using curl POST URL string in a shell scrip as a testt:

send_alert () {
  /usr/bin/curl -X POST \
    -F "title=$1" \
    -F "body=$2" \
    -F "attach=@$LOG_FILE" \
    $APPRISE_URL
}

Can this be done by sending a JSON string instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant