2024-09-08 09:24:05 +01:00
..
2024-09-04 14:34:47 +01:00
2024-09-04 14:34:47 +01:00
2024-09-08 09:24:05 +01:00
2024-09-04 14:34:47 +01:00

Body Limit Example

This example demonstrates how to use a body limit middleware in Dumbo.

Running the Example

  1. Install dependencies:

    composer install
    
  2. Start the server:

    composer start
    
  3. 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"