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 cookbook to show how to make a simple upload#4018

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
saro0h wants to merge2 commits intosymfony:masterfromsaro0h:upload-file-cookbook

Conversation

@saro0h
Copy link
Contributor

QA
Doc fix?No
New docs?yes
Applies toall
Fixed tickets#2346

This documentation refers to the ticket#2346, the second point saying:

2) Have a cookbook article that talks about uploading in Symfony, but nothing about Doctrine. This would include using a Form, validation, and moving the uploaded file in the controller.

Not sure if it was wise to put it in the cookbook/controller section. Feel free to tell me if I should put it elsewhere.

@javiereguiluz
Copy link
Member

@saro0h thanks for writing this article!! This is something that Symfony Cookbook definitely needed.

My only concern about the article is that it includes some topics that may be considered "not strictly necessary" when dealing with file uploads. To be honest, I don't know if we must remove them because they overcomplicate the article ... or we should keep them because they complement the article. In any case, those topics are the following:

  • Defining the form as service
  • Creating the form theme
  • Displaying the flash message

@mtrojanowski
Copy link
Contributor

I think it's nice to have some information on this topics (that you can, for example, change the form theme if you'd like to) but it's probably better to add them as references to the appropriate documentation entries. Thus we won't have to change anything in this article if the way you alter the form theme should ever change.

@saro0h
Copy link
ContributorAuthor

@mtrojanowski Can you tell me which one I need to change, so I can make proper corrections :)

@mtrojanowski
Copy link
Contributor

It's what@javiereguiluz suggested:

  • Defining the form as service
  • Creating the form theme
  • Displaying the flash message

@hhamon
Copy link
Contributor

Good one! 👍

Copy link
Member

Choose a reason for hiding this comment

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

You have to remove one of the colons so that the following lines are not treated as a PHP code block.

Copy link
Member

Choose a reason for hiding this comment

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

you should also include a PHP example

@wouterj
Copy link
Member

Thank you@saro0h !

I've added a bunch of commits about same minor things you have to change if you agree.

I'm -1 for adding the form theming stuff to this article. I think it's too comlex and it doesn't add anything valuable.

At last, there is a Travis build failure which you should fix and a link to this document needs to be added tocookbook/controller/index.rst andcookbook/map.rst.inc.

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work (you cannot use thedoc role to link to a certain section). Instead use something like this:

:ref:`form themes<cookbook-form-customization-form-themes>`

@weaverryan
Copy link
Member

Great job@saro0h! I just think we need much less now - simplify everything and focus on the mechanics of only setting up the form and handling the file upload.

I'd also be interested in showing them how to create a link to the file once it's uploaded.

@wouterj
Copy link
Member

ping@saro0h, can you please take a look at the comments made by@weaverryan ?

@wouterj
Copy link
Member

ping@saro0h If you don't have time, please say so, then somebody else can take it over.

@wouterj
Copy link
Member

Hi@saro0h,

On May 23rd, there will bea doc sprint day. Do you maybe have time to update your PR before/during that day? If you don't, we can add it to a list so other people can work on it during that day (you can of course also join us on that day to have some fun & finish this PR 😄)

Thanks for starting this one!

@javiereguiluz
Copy link
Member

I took the original work made by@saro0h and finished it in a new PR#5375 which supersedes this one.

@xabbuh
Copy link
Member

closing in favor of#5375

@xabbuhxabbuh closed thisJun 10, 2015
weaverryan added a commit that referenced this pull requestJun 19, 2015
This PR was merged into the 2.3 branch.Discussion----------Added a new cookbook about file uploading| Q             | A| ------------- | ---| Doc fix?      | no| New docs?     | yes| Applies to    | all| Fixed tickets |#2346This PR is completely based on the work made by@saro0h in#4018. All the credit for the original work goes to her. I just picked her work and applied the suggestions made by@weaverryan@xabbuh and@wouterj to make it mergeable.If you agree with this PR, please merge it as soon as possible because this is a very important topic and we're a bit late on this doc. Thanks!Commits-------4a7709b Fixed all the issues spotted by Ryan20ae21b Added a new cookbook about file uploading
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

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@saro0h@javiereguiluz@mtrojanowski@hhamon@wouterj@weaverryan@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp