Parcourir la source

Update publish.md with powershell snippet for uploading files

YMan84 il y a 2 ans
Parent
commit
7dfcda9306
1 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. 12 1
      docs/publish.md

+ 12 - 1
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",