-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added cookbook to show how to make a simple upload #4018
Conversation
@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:
|
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. |
@mtrojanowski Can you tell me which one I need to change, so I can make proper corrections :) |
It's what @javiereguiluz suggested:
|
Good one! 👍 |
} | ||
} | ||
|
||
Create the corresponding template as following:: |
There was a problem hiding this comment.
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.
</ul> | ||
{% endfor %} | ||
{% endfor %} | ||
{# … #} |
There was a problem hiding this comment.
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
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 to |
{% endblock form_row %} | ||
|
||
Some sugar has been added by adapting our form with a form theme (take a look at | ||
the :doc:`form themes </cookbook/form/form_customization#what-are-form-themes>` |
There was a problem hiding this comment.
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 the doc
role to link to a certain section). Instead use something like this:
:ref:`form themes <cookbook-form-customization-form-themes>`
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. |
ping @saro0h, can you please take a look at the comments made by @weaverryan ? |
ping @saro0h If you don't have time, please say so, then somebody else can take it over. |
Hi @saro0h, On May 23rd, there will be a 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! |
closing in favor of #5375 |
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 | #2346 This 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 Ryan 20ae21b Added a new cookbook about file uploading
This documentation refers to the ticket #2346, the second point saying:
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.