arshad1114/laravel-dms-disk-server
Composer 安装命令:
composer require arshad1114/laravel-dms-disk-server
包简介
Laravel server-side receiver package for arshad1114/laravel-dms-disk. Exposes a standardized HTTP API so any consumer service can store files on this DMS using the native Storage facade.
README 文档
README
Laravel server-side receiver package for arshad1114/laravel-dms-disk.
Install this package in your DMS Laravel service. It exposes a standardized HTTP API so any consumer service using arshad1114/laravel-dms-disk can store, retrieve and manage files on this service using the native Storage facade — no custom HTTP code needed on either side.
How it works
Consumer service DMS service (this package)
──────────────── ──────────────────────────
Storage::disk('dms')->put(...) POST /dms-disk/upload
Storage::disk('dms')->get(...) HTTP GET /dms-disk/file
Storage::disk('dms')->delete() ────► DELETE /dms-disk/file
... ...
Calls Storage::put(...)
using your filesystems.php
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
Installation
composer require arshad1114/laravel-dms-disk-server
The DmsServerServiceProvider is auto-discovered. All routes, middleware and controller are registered automatically.
Publish the config:
php artisan vendor:publish --tag=dms-disk-server-config
Configuration
Add to your DMS service .env:
DMS_SERVER_TOKEN=your-strong-secret-token
Set your storage disk as you normally would in any Laravel app:
FILESYSTEM_DISK=local
The package uses whatever disk you configure here — local, S3, GCS, or any other Laravel-supported driver. It has zero opinion about where files are stored.
Full config reference
All options in config/dms-disk-server.php:
| Key | Env variable | Default | Description |
|---|---|---|---|
token |
DMS_SERVER_TOKEN |
'' |
Bearer token consumers must send |
max_file_size_kb |
DMS_SERVER_MAX_FILE_SIZE_KB |
102400 |
Max upload size in KB (default 100 MB) |
route_prefix |
DMS_SERVER_ROUTE_PREFIX |
'dms-disk' |
URL prefix for all endpoints |
API endpoints
All endpoints are protected by bearer token authentication.
| Method | Endpoint | Description |
|---|---|---|
POST |
/dms-disk/upload |
Upload a file |
GET |
/dms-disk/file |
Download a file |
DELETE |
/dms-disk/file |
Delete a file |
GET |
/dms-disk/exists |
Check if a file exists |
GET |
/dms-disk/url |
Get public URL |
GET |
/dms-disk/temp-url |
Get temporary signed URL |
POST |
/dms-disk/move |
Move or rename a file |
GET |
/dms-disk/list |
List files in a directory |
GET |
/dms-disk/metadata |
Get file metadata |
POST |
/dms-disk/visibility |
Set file visibility |
Authentication
Every request must include the token as a bearer token:
Authorization: Bearer your-strong-secret-token
Or as a custom header:
X-DMS-Token: your-strong-secret-token
Verify installation
After installing, verify all routes are registered:
php artisan route:list --path=dms-disk
You should see all 10 endpoints listed.
Troubleshooting
401 Unauthorized
DMS_SERVER_TOKEN in the DMS service does not match DMS_TOKEN in the consumer service. Make sure both values are identical.
500 DMS_SERVER_TOKEN is not set
DMS_SERVER_TOKEN is missing from .env. Add it:
DMS_SERVER_TOKEN=your-strong-secret-token
Routes not showing up
php artisan route:clear php artisan route:list --path=dms-disk
If still missing, check the provider is registered:
php artisan package:discover
Consumer package
Install this on every service that needs to store files on this DMS:
Contributing
Contributions are welcome. Please:
- Fork the repo
- Create a feature branch:
git checkout -b feat/your-feature - Write tests for your change
- Make sure all tests pass:
./vendor/bin/phpunit - Open a pull request
License
MIT — see LICENSE file.
arshad1114/laravel-dms-disk-server 适用场景与选型建议
arshad1114/laravel-dms-disk-server 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 03 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「filesystem」 「storage」 「dms」 「server」 「laravel」 「Microservice」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 arshad1114/laravel-dms-disk-server 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arshad1114/laravel-dms-disk-server 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 arshad1114/laravel-dms-disk-server 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A SDK for working with B2 cloud storage.
A PHP class providing static methods for reading, writing, copying, moving, and deleting files and directories, MIME type detection, image size detection, and file permission management
Small library to access Microsoft Windows Azure Blob Storage with a Service or a StreamWrapper.
The flysystem adapter for yandex disk rest api.
A sleek PHP wrapper around rclone with Laravel-style fluent API syntax
DMS Meetup API Bundle, enables Meetup API clients in services
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 38
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-15