kamihikoki
v1.0.1
Published
Minimum file uploader webapp & server CLI
Readme
kamihikoki
A minimum file uploader webapp and server CLI for temporary file sharing.
Features
- Pure Node.js (no external dependencies)
- File upload, access log, change upload directory, admin web UI
- CORS: only admin UI is allowed from localhost
- Maximum upload size can be set from admin UI
- All logs and messages are in English
Usage
Start
npx kamihikoki
# or
node server.js [upload-directory]When started, you will see:
Server running: http://localhost:3000
Upload dir: /current-dir/file-server/uploads
Admin: http://localhost:3000/adminAccess
- Upload UI: http://localhost:3000/upload.html
- Admin UI: http://localhost:3000/admin
API
- POST
/api/upload: File upload (multipart/form-data) - GET
/api/accesslog: Get access log (for admin UI) - POST
/api/setdir: Change upload directory (admin UI, JSON{dir: "..."}) - POST
/api/setmaxsize: Change max upload size (admin UI, JSON{maxSize: <MB>})
Notes
- Access log is in-memory only (reset on server restart)
- Upload history is stored in sessionStorage on upload UI
- Intended to be used with ngrok for temporary external access
- Designed for cases where you want to receive files directly from guest PCs without authentication (temporary server)
How to use with ngrok
- Start the server:
npx kamihikoki - In another terminal, run ngrok:
ngrok http 3000 - Share the ngrok URL (e.g.
https://xxxx.ngrok.io/upload.html) with uploaders. - Uploaders can access the upload page directly from WAN, no authentication required.
Note: Admin UI and server settings are only accessible from localhost for security.
