https://github.com/00nx/temp-file-server
A simple temporary file server written on node js, upload and download
https://github.com/00nx/temp-file-server
api curl express fast javascript javasript multer nodejs temp temp-fille temporary-file
Last synced: 2 months ago
JSON representation
A simple temporary file server written on node js, upload and download
- Host: GitHub
- URL: https://github.com/00nx/temp-file-server
- Owner: 00nx
- License: mit
- Created: 2025-07-15T13:54:15.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-15T14:04:15.000Z (11 months ago)
- Last Synced: 2025-07-16T07:17:56.751Z (11 months ago)
- Topics: api, curl, express, fast, javascript, javasript, multer, nodejs, temp, temp-fille, temporary-file
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# 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**
```bash
git clone https://github.com/yourusername/temp-file-server.git
cd temp-file-server
```
```bash
npm install
```
🏃♂️ Running locally
Start the server:
```bash
npm start
```
📤 Upload a file
Use cURL, Postman, or any client:
```bash
curl -F "file=@yourfile.txt" http://localhost:3000/uploadfile
```
📥 Download a file
Visit the link in your browser, or curl it:
```bash
curl -O http://localhost:3000/download/
```
🌍 Expose your server (Windows)
1️⃣ Using ngrok
# Download [ngrok](https://ngrok.com/downloads/windows) & add to PATH
```bash
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](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/update-cloudflared/) & add it to your PATH.
Run a tunnel:
```bash
cloudflared tunnel --url http://localhost:3000
```
Use the generated trycloudflare.com link:
```bash
https://abc123.trycloudflare.com/uploadfile****
```