A Laravel-based REST API for VueFinder file management operations.
This project provides a backend API for VueFinder, a file manager library. It enables file and folder operations including listing, searching, uploading, downloading, renaming, moving, copying, archiving, and more.
- PHP >= 8.2
- Composer
- Clone the repository:
git clone <repository-url>
cd vuefinder-api-php- Install dependencies:
composer install- Set up environment:
cp .env.example .env
php artisan key:generate- Configure storage:
php artisan storage:link- Run migrations (if needed):
php artisan migrateStart development server:
composer run devAll endpoints are prefixed with /api/files:
GET /api/files- List files in a directoryGET /api/files/search- Search filesGET /api/files/download- Download a fileGET /api/files/preview- Preview a file
POST /api/files/upload- Upload a filePOST /api/files/rename- Rename a file/folderPOST /api/files/move- Move files/foldersPOST /api/files/copy- Copy files/foldersPOST /api/files/archive- Archive files/foldersPOST /api/files/unarchive- Extract archivePOST /api/files/create-file- Create a new filePOST /api/files/create-folder- Create a new folderPOST /api/files/save- Save file contentPOST /api/files/delete- Delete files/folders
The API uses three storage disks configured in VueFinderServiceProvider:
local://- Maps tostorage/app/privatepublic://- Maps tostorage/app/publicmedia://- Maps tostorage/app/public/media(with public URL access)
# List files in a directory
GET /api/files?path=local://uploads
# Upload a file
POST /api/files/upload?path=local://uploads
Content-Type: multipart/form-data
Body: file=<file>
# Delete a file
DELETE /api/files/delete?path=local://uploads/file.txtMIT