Getting wrong relative path from file id
Permalink
Hi
i trying getting a simple path image from my custom block
add.php/ edit.php
has a select for image
on my controller i getting my file
with this in the view
this return in my view /files/
i trying getting a simple path image from my custom block
add.php/ edit.php
has a select for image
on my controller i getting my file
with this in the view
public function view(){ $imageFile = File::getByID($this->post('my_image')); $fv = $imageFile->getApprovedVersion(); $relpath = $fv->getRelativePath(); $this->set('image', $relpath); }
this return in my view /files/