Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added docs for file helper#6454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
dfridrich wants to merge5 commits intosymfony:masterfromdfridrich:file_helper

Conversation

@dfridrich
Copy link
Contributor

QA
Doc fix?no
New docs?yessymfony/symfony#18502
Applies to3.1
Fixed tickets

@OskarStark
Copy link
Contributor

LGTM 👍

@wouterj
Copy link
Member

@OskarStark it can't be as the feature has not yet been merged (and there still is some discussion on the implementation).

@OskarStark
Copy link
Contributor

Oh sorry@wouterj , i meant the current status looks good ;-)

@xabbuhxabbuh added this to the3.2 milestoneMay 21, 2016
fabpot added a commit to symfony/symfony that referenced this pull requestJun 15, 2016
…rich)This PR was squashed before being merged into the 3.2-dev branch (closes#18502).Discussion----------[FrameworkBundle] Add file helper to Controller| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |symfony/symfony-docs#6454I think it would be more "sexy" to serve files from controller easier (like `json()` helper does).**This Controller helper allows user to serve files to Response in these ways:*** pass `Symfony\Component\HttpFoundation\File` (or `Symfony\Component\HttpFoundation\UploadedFile`) instance* [REMOVED] provide content as `string` and specify file name (mime type will be auto recognized)* provide path to file (you are still able to specify other than original file name)**Examples**    return $this->file($uploadedFile);    // ...or...    return $this->file('/path/to/my/picture.jpg');Commits-------d9a8499 [FrameworkBundle] Add file helper to Controller
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestJun 15, 2016
…rich)This PR was squashed before being merged into the 3.2-dev branch (closes #18502).Discussion----------[FrameworkBundle] Add file helper to Controller| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |symfony/symfony-docs#6454I think it would be more "sexy" to serve files from controller easier (like `json()` helper does).**This Controller helper allows user to serve files to Response in these ways:*** pass `Symfony\Component\HttpFoundation\File` (or `Symfony\Component\HttpFoundation\UploadedFile`) instance* [REMOVED] provide content as `string` and specify file name (mime type will be auto recognized)* provide path to file (you are still able to specify other than original file name)**Examples**    return $this->file($uploadedFile);    // ...or...    return $this->file('/path/to/my/picture.jpg');Commits-------d9a8499 [FrameworkBundle] Add file helper to Controller
File helper
~~~~~~~~~~~

If you want to serve file use
Copy link
Member

Choose a reason for hiding this comment

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

[...] use the [...]

dfridrich and OskarStark reacted with thumbs up emoji
@wouterj
Copy link
Member

Hi@dfridrich.

I've rebased your PR and tweaked the wording a bit (so we can remove most of the paragraph and use the code examples more) in#6732. I've kept your commit, so you'll still get the credits you deserve.

Thanks!

dfridrich reacted with thumbs up emoji

@wouterjwouterj closed thisJul 8, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

3.2

Development

Successfully merging this pull request may close these issues.

4 participants

@dfridrich@OskarStark@wouterj@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp