This module allows to upload images to ImgBB.
> nupm install --git [email protected]:GooRoo/ImgBB.nu.git
> use imgbbYou need to get an API token here first.
You can upload an existing image like this:
> 'path/to/image.png' | imgbb upload file 'your-secret-key'Alternatively, you can pipe through a binary or base64 data:
> open --raw path/to/image.png | imgbb upload data 'your-secret-key'Also, both commands support setting the expiration duration.
> # upload all PNGs from the current folder and set the expiration for 1 hour
> ls *.png | each {|pic| $pic.name | imgbb upload file 'your-secret-key' --expire 1hr }