A clean and elegant file sharing system built with SvelteKit.
- 🚀 Multi-file Upload - Support drag & drop upload, various file formats
- 📁 File Management - View, download, delete uploaded files
- 🖼️ File Preview - Online preview for image files
- 📊 Smart Classification - Distinguish between "All Uploads" and "Local Uploads"
- 🔄 Real-time Sync - Real-time file list updates based on Server-Sent Events
- 📱 Responsive Design - Support both grid and list display modes
- 🎯 Multi-dimensional Sorting - Sort by time, filename, size
- 🎨 Modern UI - Clean and beautiful user interface
- Frontend: SvelteKit + TypeScript
- Backend: SvelteKit API Routes
- Styling: CSS + Tailwind CSS
- File Processing: Node.js File System API
- Real-time Communication: Server-Sent Events
npm installnpm run dev
# Or start server and auto-open browser
npm run dev -- --opennpm run buildnpm run preview- Upload Files: Click "Select Files" button or drag & drop files to the page
- View Files: Browse uploaded files in the file library
- File Operations:
- Click images to preview
- Click "Download" button to download files
- Click "Delete" button to delete files
- Switch Views: Use "All Uploads" and "Local Uploads" tabs to switch file views
- Sorting and Layout: Use sort buttons and layout toggle buttons to customize display
src/
├── lib/
│ ├── icons/ # SVG icon components
│ ├── server/ # Server-side utilities
│ └── types/ # TypeScript type definitions
├── routes/
│ ├── api/ # API routes
│ │ ├── upload/ # File upload endpoint
│ │ ├── images/ # File list endpoint
│ │ └── events/ # Real-time events endpoint
│ └── files/ # File access routes
└── app.html # Application template
./start.shstart.batstart-simple.bat.\start.ps1node index.js- Uploaded files are stored in the
uploads/directory - Supported file types: images, documents, videos, audio, archives, etc.
- Filenames are automatically timestamped to avoid conflicts
- Supports Chinese filenames
Add new file extensions in the getFileIcon function in src/routes/+page.svelte:
function getFileIcon(format: string) {
const ext = format.toLowerCase();
// Add new file types
if (['new-format'].includes(ext)) {
return NewFormatIcon;
}
// ... other types
}The project uses Tailwind CSS, you can customize styles in src/routes/+page.css.
Issues and Pull Requests are welcome!
MIT License