Table of contents:
hcload offers a convenient deno API
import hcload from "https://deno.land/x/hcload@1.3.2/mod.ts"
const urls: string[] = await hcload({
files: fullPaths,
urls: YourUrls,
})
Where
- fullPaths is an array of complete filesystem paths to files
- urls is an array of urls
Only one parameter is nessecary
Make sure you have deno
deno install -A https://deno.land/x/hcload/hcload.ts
then run (see usage)
hcload -f filename.mp3
Needs the following
- --allow-env
- --allow-net
- --allow-read=~/.ngrok-deno
- --allow-write=~/.ngrok-deno
- --allow-run
Or just
- -A
Usage: hcload -f [files...] -u [urls...]
Options:
--help Show help [boolean]
--version Show version number [boolean]
-f, --files Path to file(s) to upload [array]
-u, --urls URL(s) to host on CDN [array]
-s, --silent Do not print "Working..." [boolean]
Examples:
hcload -f myPic.png Upload one file
hcload -f myPic.png vid.mp4 song.mp3 Upload multiple files
hcload -u https://b.me/foo.mp3 Upload from one URL
hcload -u https://a.me/foo.mp3 https://a.me/foo.jpg Upload from multiple URLs
hcload -u https://a.me/foo.mp3 -f myPic.png myMusic.mp3 Upload from file[s] and URL[s]