Skip to content

tallypaws/Stash

Repository files navigation

Stash

A temporary file host with a large maximum file size.

https://stash.tally.gay

use

  1. click upload button in the middle of the website
  2. pick your file
  3. change lifespan or add password (optional)
  4. upload
  5. copy link
  6. give it to people

there is currently no way to delete an uploaded file manually

limits and expiration

This app uses a "tank" system to limit uploads

  • users gain 100 MB per hour
  • maximum capacity is 2 GB
  • mploading files consumes from this tank
  • the tank refills continuously over time

uploaded files have a lifespan based on their size:

  • small files can last up to a week
  • larger files expire sooner
  • the maximum size (2 GB) may only last around 1 hour

the bigger the file, the faster it disappears

accounts

there is no account system

instead limits are tied to your IP address

  • this is simple and fast
  • can be bypassed easily (VPN, different device, proxy, etc)

not exactly the best system, but i did not want accounts because that took away from my idea of a website where you can just press upload and be done

uploading

  • files are uploaded in chunks
  • chunks are deduplicated using hashes
  • stored chunks are compressed with xz
  • files are reconstructed as a stream when downloaded

extra stuffs

  • optional password protection per file
  • live updates using SSESocketServer (temu websocket-ish stream implementation)
  • automatic cleanup:
    • expired files are deleted
    • unused chunks are removed
    • orphaned data is cleaned up (because i KNOW my code will have leaks :3)

hosting

this is quite easy to host

prerequisites:

  • a computer that can run docker
  • docker
  • knowledge of how to use docker
  • a pulse (optional)

edit the docker compose to enable port binding (my setup does not use these) run docker compose up -d and wow its up and running

since there are no authentication, this will be open to everyone who can access the page

development

idk why you would want to do this but okay

this is just a sveltekit app with nothing outside of that so its quite simple

prerequisites:

  • nodejs (preferrably a recent version, i have not tested compatibility)
  • xz in PATH (for file compression)
  • a code editor
  • a pulse (optional again)

to run dev server: npm run dev to build: npm run build to start: npm run start

note: you WILL have to set the ENV variable BODY_SIZE_LIMIT to at least 2mb (or set it to Infinity) i have no idea why you cant edit this in a config file its honestly stupid

license

if for some unholy reason you want to use any of my code, you can with credit

About

a temporary file host

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors