mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-16 21:58:25 +01:00
Body Limit Example
This example demonstrates how to use a body limit middleware in Dumbo.
Running the Example
-
Install dependencies:
composer install
-
Start the server:
composer start
-
Access the route:
Upload file less than 1MB (Success)
curl -X POST http://localhost:8000/upload -F "file=@/path/to/your/less-than-1MB.file"
Upload file larger than 1MB (Error)
curl -X POST http://localhost:8000/upload -F "file=@/path/to/your/file-larger-than-1MB.file"