Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix code file upload#2453
Uh oh!
There was an error while loading.Please reload this page.
Conversation
indeed my actuall implementation uses $this->file = null |
@@ -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); | |||
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.
please remove the extra 2 lines
@weaverryan i also noticed that the third block in the page in the 2.2 branch and master branch is broken see the pagehttp://symfony.com/doc/current/cookbook/doctrine/file_uploads.html |
ok, I'm doing a new PR |
…(even though case does not matter)
$this->setFile(null); is wrong because $this->temp was fill with $this->path
So the uploaded file was deleted just after uploaded