File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -48,18 +48,23 @@ First, create a simple Doctrine Entity class to work with::
48
48
*/
49
49
public $path;
50
50
51
- public function getFullPath()
51
+ public function getAbsolutePath()
52
+ {
53
+ return null === $this->path ? null : $this->getUploadRootDir().'/'.$this->path;
54
+ }
55
+
56
+ public function getWebPath()
52
57
{
53
- return null === $this->path ? null : $this->getWebLocation ().'/'.$this->path;
58
+ return null === $this->path ? null : $this->getWebPath ().'/'.$this->path;
54
59
}
55
60
56
61
protected function getUploadRootDir()
57
62
{
58
63
// the absolute directory path where uploaded documents should be saved
59
- return __DIR__.'/../../../../web/'.$this->getWebLocation ();
64
+ return __DIR__.'/../../../../web/'.$this->getUploadDir ();
60
65
}
61
66
62
- protected function getWebLocation ()
67
+ protected function getUploadDir ()
63
68
{
64
69
// get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image in the view.
65
70
return 'uploads/documents';
You can’t perform that action at this time.
0 commit comments