Skip to content

Fix code file upload #2453

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

Closed
wants to merge 2 commits into from
Closed

Fix code file upload #2453

wants to merge 2 commits into from

Conversation

agiuliano
Copy link
Contributor

$this->setFile(null); is wrong because $this->temp was fill with $this->path
So the uploaded file was deleted just after uploaded

@mahmouds
Copy link
Contributor

mahmouds commented Apr 2, 2013

indeed my actuall implementation uses $this->file = null
@agiuliano thanks for the report but this needs to go to the 2.0 branch not the master

@@ -408,7 +408,7 @@ Next, refactor the ``Document`` class to take advantage of these callbacks::
// the entity from being persisted to the database on error
$this->getFile()->move($this->getUploadRootDir(), $this->path);

$this->setFile(null);

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove the extra 2 lines

@mahmouds
Copy link
Contributor

mahmouds commented Apr 2, 2013

@weaverryan i also noticed that the third block in the page in the 2.2 branch and master branch is broken see the page http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html

@agiuliano
Copy link
Contributor Author

ok, I'm doing a new PR

@agiuliano agiuliano closed this Apr 2, 2013
@mahmouds mahmouds mentioned this pull request Apr 11, 2013
weaverryan added a commit that referenced this pull request Jun 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants