From 7dfcda93065c620baf1c2c5dbd707db412eaddb6 Mon Sep 17 00:00:00 2001 From: YMan84 <62976572+YMan84@users.noreply.github.com> Date: Mon, 15 Jan 2024 19:11:55 -0500 Subject: [PATCH] Update publish.md with powershell snippet for uploading files --- docs/publish.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/publish.md b/docs/publish.md index 41370778..7cb02ff1 100644 --- a/docs/publish.md +++ b/docs/publish.md @@ -2439,7 +2439,18 @@ Here's an example showing how to upload an image: req.Header.Set("Filename", "flower.jpg") http.DefaultClient.Do(req) ``` - + +=== "PowerShell" + ``` powershell +$Request = @{ + Method = "POST" + Uri = "ntfy.sh/flowers" + InFile = "flower.jpg" + Headers = @{"Filename" = "flower.jpg"} +} + Invoke-RestMethod @Request + ``` + === "Python" ``` python requests.put("https://ntfy.sh/flowers",