File Upload (ImageKit)
The File Upload component provides a standardized way to handle file uploads in Servercn using ImageKit as the storage provider.
Docs:
Installation Guide
npx servercn-cli add file-uploadYou will be prompted to select a file upload provider:
The CLI will then automatically configure the component based on your selected provider.
Prerequisites
You must have an ImageKit account. Click here if you don't have one.
Basic Implementation
1. ImageKit Configuration
Create an ImageKit configuration file:
2. Upload Middleware
Servercn uses multer to handle multipart file uploads.
3. ImageKit Services
Services for uploading files to ImageKit and deleting files from ImageKit.