Skip to content

Files

Latest commit

author
Largehawiian
Sep 25, 2022
dcb14b8 · Sep 25, 2022

History

History
40 lines (34 loc) · 1.1 KB

README.md

File metadata and controls

40 lines (34 loc) · 1.1 KB

ImgBBAPI

Requires Powershell 7

Install Module

    Install-Module PoshImgBB
    Import-Module PoshImgBB

Capture Screenshot

    _Screenshot -Key "Your Key" # Captures all monitors
    _Screenshot -Key "Your Key" -OfWindow # captures current window

Function to upload to ImgBB's API

# To use the function, either paste it in your terminal or dot source it.

_UploadImage -Path "C:\Temp\Image.png" -Key "Your Key" 
_UploadImage -Path "C:\Temp\Image.png" -Key "Your Key" -OpenInBrowser

# . .\UploadFolder.ps1
# Upload all images in a folder recursively.
# Recommended to use the included script shown below for file type validation.
Get-ChildItem -Path "C:\Temp\" | _UploadFolder -Key "Your Key"

Upload Script

.\ImageUploadScript.ps1 -Path "C:\Temp\Image.png" -Key "Your Key" -OpenInBrowser
# Upload all images in a folder
.\ImageUploadScript.ps1 -Path "C:\Temp\" -Key "Your Key" -UploadFolder

Get Help

Get-Help .\ImageUploadScript.ps1 -Examples

Video Demonstration

Demonstration