Skip to content
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

[cookbook] use __dir__ in file_upload #3582

Closed
ochurlaud opened this issue Feb 17, 2014 · 2 comments
Closed

[cookbook] use __dir__ in file_upload #3582

ochurlaud opened this issue Feb 17, 2014 · 2 comments

Comments

@ochurlaud
Copy link

in how to handle file uploads with doctrine, the doc use the _ _ dir _ _ variable.

According to SensioLabs Insight, it's not a "best practise". How can one handle this ?

Thx...

   protected function getUploadRootDir()
    {
        // the absolute directory path where uploaded
        // documents should be saved
        return __DIR__.'/../../../../web/'.$this->getUploadDir();
    }
@wouterj
Copy link
Member

wouterj commented Feb 17, 2014

@wouterj wouterj closed this as completed Feb 17, 2014
@wouterj
Copy link
Member

wouterj commented Feb 17, 2014

see also #2346

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

No branches or pull requests

2 participants