Skip to content

Usage

This page covers all the ways you can use fileup.

Basic Usage

Upload a file with:

fu filename

Command Line Options

usage: fu [-h] [-t TIME] [-d] [-i] [-c] [filename]

Publish a file.

Create a config file at ~/.config/fileup/config.ini with the following structure:

[default]
protocol = ftp  # or scp
hostname = example.com  # or the Host from your ~/.ssh/config
base_folder = /path/to/files  # where files are stored on the server
file_up_folder =  # subdirectory in URL, can be empty
url = files.example.com  # the actual URL where files are accessible

[ftp]
username = my_user_name
password = my_difficult_password

[scp]
# If empty, will use your SSH config
username =
# If using SSH config, no need for these
private_key =
password =

positional arguments:
  filename         Local filename. With --clipboard this is an optional remote filename.

options:
  -h, --help       show this help message and exit
  -t, --time TIME  If time is 0 the file will never be deleted, default is 90 days.
  -d, --direct
  -i, --img
  -c, --clipboard  Upload clipboard content (image preferred, then text).

Options Explained

  • -t DAYS, --time DAYS: Set an expiration time in days (default: 90, use 0 for no expiration)
  • -d, --direct: Return a direct URL without any prefixes
  • -i, --img: Return the URL formatted for markdown image embedding

Special Features

  • Jupyter Notebooks: If you're uploading a Jupyter notebook (.ipynb), the returned URL will be accessible via nbviewer.jupyter.org
  • Automatic Deletion: Files with expiration times are automatically removed when their time is up
  • Clipboard Upload: Upload clipboard image/text with fu --clipboard
  • URL Copying: On macOS, the URL is automatically copied to your clipboard

macOS Integration

fileup uses pbcopy so the uploaded URL is automatically copied on macOS. For clipboard uploads, it will try common commands in order: - image: pngpaste, wl-paste, xclip - text: pbpaste, wl-paste, xclip, xsel, powershell