Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

WIP: feat(Response): add file property to Response object to be able to serve files #23

Merged
merged 1 commit into from
May 5, 2020

Conversation

1992clement
Copy link

@1992clement 1992clement commented Apr 30, 2020

Purpose is to be able to serve files with RREST.
This PR proposes to add a Response::fileproperty. If this property is set, the Router::getResponse() method will return a HttpFoundation\BinaryFileResponse, instead of a simple HttpFoundation\Response.
The detailled configuration of the BinaryFileResponse is expected to be done afterward, by the client. (headers, deleteFileAfterSend, etc...)

@coveralls
Copy link

coveralls commented Apr 30, 2020

Coverage Status

Coverage increased (+0.009%) to 93.503% when pulling be7bccc on 1992clement:file-support into 6d96ed1 on RETFU:master.

@1992clement 1992clement changed the title feat(Response): add getRouterBinaryFileResponse() to serve files WIP: feat(Response): add getRouterBinaryFileResponse() to serve files Apr 30, 2020
Copy link
Collaborator

@yannickroger yannickroger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour moi avec ça on est bon.

src/FileResponseConfiguration.php Outdated Show resolved Hide resolved
src/FileResponseConfiguration.php Outdated Show resolved Hide resolved
src/FileResponseConfiguration.php Outdated Show resolved Hide resolved
src/FileResponseConfiguration.php Outdated Show resolved Hide resolved
src/FileResponseConfiguration.php Outdated Show resolved Hide resolved
src/Response.php Outdated Show resolved Hide resolved
src/FileResponseConfiguration.php Outdated Show resolved Hide resolved
src/Response.php Outdated Show resolved Hide resolved
@1992clement 1992clement force-pushed the file-support branch 5 times, most recently from b347377 to 061cacb Compare April 30, 2020 17:43
src/Router/Silex.php Outdated Show resolved Hide resolved
src/Router/RouterInterface.php Outdated Show resolved Hide resolved
src/Router/RouterInterface.php Outdated Show resolved Hide resolved
src/Response.php Outdated Show resolved Hide resolved
src/Router/Silex.php Outdated Show resolved Hide resolved
@1992clement 1992clement force-pushed the file-support branch 5 times, most recently from 3425481 to a95b6cc Compare May 4, 2020 17:27
@1992clement 1992clement changed the title WIP: feat(Response): add getRouterBinaryFileResponse() to serve files WIP: feat(Response): file property to serve files May 4, 2020
@1992clement 1992clement changed the title WIP: feat(Response): file property to serve files WIP: feat(Response): add file property to Response object to be able to serve files May 4, 2020
@1992clement 1992clement force-pushed the file-support branch 4 times, most recently from 6ce792f to 23b5271 Compare May 4, 2020 20:21
Copy link
Owner

@RETFU RETFU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this last comment it will be ok for me

src/Response.php Outdated Show resolved Hide resolved
@RETFU RETFU merged commit 759a8d4 into RETFU:master May 5, 2020
@1992clement 1992clement deleted the file-support branch May 5, 2020 08:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants