This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <#usage: use the following line as your command in the foobar2000 plugin | |
| pwsh.exe C:\Path\To\catbox.ps1 | |
| note: doesn't work right on PowerShell 5 "powershell.exe", you need PowerShell 7#> | |
| $upload = Resolve-Path -LiteralPath $input | Select-Object -ExpandProperty Path | |
| $uri = "https://catbox.moe/user/api.php" | |
| $body = @{ | |
| "reqtype"="fileupload" | |
| "fileToUpload"=Get-Item $upload | |
| } | |
| Invoke-WebRequest -Uri $uri -Method POST -Form $body | Select-Object -ExpandProperty Content |