laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.74k stars 291 forks source link

BinaryFileResponse deleteFileAfterSend is not implemented in the Swoole Client #940

Closed NiroDeveloper closed 1 month ago

NiroDeveloper commented 1 month ago

Octane Version

2.5.2

Laravel Version

11.19.0

PHP Version

8.3

What server type are you using?

Swoole

Server Version

5.1.3

Database Driver & Version

No response

Description

If you sent files via a BinaryFileResponse and call deleteFileAfterSend(), then octane will not delete the file after sending.

Steps To Reproduce

  1. Send a file via return response()->file($tempFile)->deleteFileAfterSend();
  2. See that the file still exists after the download
driesvints commented 1 month ago

deleteFileAfterSend isn't a documented Laravel method and can't ever work with Octane because Octane uses long running requests.