mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-02-17 04:14:09 +01:00
Update publish.md with powershell snippet for uploading files
This commit is contained in:
parent
bb4b5d2bc8
commit
7dfcda9306
1 changed files with 12 additions and 1 deletions
|
@ -2440,6 +2440,17 @@ Here's an example showing how to upload an image:
|
|||
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",
|
||||
|
|
Loading…
Add table
Reference in a new issue