Ahoy-
-- I have a bit of a problem. I have two applications located at the following directory paths:
- customer = /var/www/vhosts/customer/customer/app/
- administrator = /var/www/vhosts/administrator/administrator/app/
These are completely different applications, BUT I need for the administrator application to write and read media files from the customer webroot directory. I have spent two days on this...I'm starting to think it can't be done. Here is the administrator controller code I am using for a download:
public function conceptdownload($id,$companyid) { ///I have tried several iterations of this path
$dir = '/var/www/vhosts/customer/customer/app/webroot/proofs/'.$companyid.'/';
$options = array('conditions'=>array('ConceptFile.id'=>$id)); $getfile = $this->ConceptFile->find('first',$options); $this->viewClass = 'Media'; $base = explode('.',$getfile['ConceptFile']['filename']); $params = array( 'id' => $getfile['ConceptFile']['filename'], 'name' => $getfile['ConceptFile']['filename'], 'download' => true, 'extension' => $base[1], 'path' => $dir );
$this->set($params); }.
Any recommendations?
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment