Update publish.md with powershell snippet for uploading files

This commit is contained in:
YMan84
2024-01-15 19:11:55 -05:00
committed by GitHub
parent bb4b5d2bc8
commit 7dfcda9306

View File

@@ -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",