/FILESDOTHARRYDOTCITY

Temporary file sharing

Primary LanguageJavaScript

FILESDOTHARRYDOTCITY

File sharing, built for IRC

Usage

  1. npm i
  2. Set password environment variable, e.g. export PASSWORD=x
  3. Set hostname environment variable for the returned links, e.g. export HOSTNAME=https://harry.city
  4. Set port environment variable, e.g. export PORT=3000
  5. node index.js

Code snippets

You can upload code snippets from the homepage, instead of storing the data in a DB it creates a HTML file on the fly which is then hosted in the static/ folder like any other upload. The code snippet request will return a URL to this HTML file instead of the raw snippet however the page contains a link to the raw snippet.

CLI upload tool

Move hdc.sh to /usr/local/bin/hdc and chmod +x /usr/local/bin/hdc.

Help output

FILESDOTHARRYDOTCITY upload tool v1.0 - upload temporary files to files.harry.city

usage: hdc [--version] [--help] [-p <password> | --password <password>] [-u <url> | --url <url>] [-x] [-c | --clip] <file path>

options:
  <file path> | clipboard
      If no file path is provided then the image in the clipboard will be used.

  --version
      Prints the tool version.

  --help
      Prints description and tool arguments.

  -p <password>, --password <password>
      Password for the server. Can also be provided at the top of the script.

  -u <url>, --url <url>
      Uses a different upload URL than the one embedded in the tool. Can be used for debugging purposes.

  -x
      Generates a URL using the 'x' id scheme.

  -c, --clip
      Upload an image clip (uses xclip and maim on Linux).

Wiping cron command

0 * * * * find $LOCATION/static -type f -mmin +1440 -delete