Created
February 14, 2023 00:45
-
-
Save vt-idiot/8a7161a48dc6f7f7719423e938217267 to your computer and use it in GitHub Desktop.
Catbox Script for s0hv/foo_discord_rich
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment