A simple CLI tool for uploading files to the File Dumper service.
You can install the CLI tool globally using Deno:
deno install -grAf -n=fdt https://esm.town/v/wolf/FileDumpThing/cli/upload.ts
This command:
-g
)-r
)-A
)-f
)fdt
(-n=fdt
)After installation, you can use the tool with the fdt
command:
cat image.png | fdt image.png
# Upload a file cat path/to/file.jpg | fdt file.jpg # Upload text echo "Hello World" | fdt note.txt # Or use the full Deno command if not installed cat path/to/file.jpg | deno run --allow-net https://esm.town/v/wolf/FileDumpThing/cli/upload.ts file.jpg
The filename argument is optional but helps identify the file in the URL.
The CLI automatically detects whether the input is text or binary:
This detection happens by checking for null bytes in the content.
# Upload and open in browser cat image.png | fdt image.png | xargs open # Upload and copy URL to clipboard (macOS) cat document.pdf | fdt document.pdf | pbcopy # Upload text from clipboard (macOS) pbpaste | fdt notes.txt
If you prefer not to install, you can create a shell alias:
# Add to your .bashrc, .zshrc, etc. alias fdt='deno run --allow-net https://esm.town/v/wolf/FileDumpThing/cli/upload.ts'
Then use:
cat image.png | fdt image.png
The CLI tool:
filedumpthing.val.run