Skip to content

00nx/temp-file-server

Temp File Server

A simple raw API for uploading files and generating one-time download links.
Built with Node.js, Express, and Multer.


🚀 Features

  • 📁 Upload any file
  • 🔗 Get a direct download link
  • 🧩 Pure API — no frontend
  • 🔒 Works locally or expose via ngrok

📦 Installation

1️⃣ Clone the repo

git clone https://github.com/yourusername/temp-file-server.git
cd temp-file-server
npm install

🏃‍♂️ Running locally Start the server:

npm start

📤 Upload a file Use cURL, Postman, or any client:

curl -F "file=@yourfile.txt" http://localhost:3000/uploadfile

📥 Download a file Visit the link in your browser, or curl it:

curl -O http://localhost:3000/download/<id>

🌍 Expose your server (Windows) 1️⃣ Using ngrok

Download ngrok & add to PATH

ngrok http 3000

Copy the HTTPS forwarding link Use it to upload or download files, e.g. https://abc123.ngrok.io/uploadfile

✅ Using Cloudflared

Download Cloudflared & add it to your PATH.

Run a tunnel:

cloudflared tunnel --url http://localhost:3000

Use the generated trycloudflare.com link:

https://abc123.trycloudflare.com/uploadfile****

About

A simple temporary file server written on node js, upload and download

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published