Re: Multiple upload field in a model with AD7six Upload Behaviour

2009-03-11 Thread AD7six
On Mar 11, 12:59 pm, "marco.rizze...@gmail.com" wrote: > My question is: > If in a model I have many image fields and many upload field how can I > set the model to permit the use of  AD7six Upload Behaviour  with all > these fields? > Many Thanks Hi Marco, The o

Multiple upload field in a model with AD7six Upload Behaviour

2009-03-11 Thread marco.rizze...@gmail.com
My question is: If in a model I have many image fields and many upload field how can I set the model to permit the use of AD7six Upload Behaviour with all these fields? Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

/* enhancement */ - AD7six Upload Behaviour

2008-09-07 Thread José Pablo Orozco Marín
I think Is better to use the original path: function afterSave() { if (!empty($this->data[$this->name]['logo'])) { $path= $output = str_replace("//", "/", $this->data[$this->name]['original']); @unlink($path);

/* enhancement */ - AD7six Upload Behaviour

2008-09-07 Thread Josoroma
Now everything is working like i expected. To keep the file in {IMAGE}... and delete the file in {APP}... im using the afterSave callback in my model: function afterSave() { if (!empty($this->data[$this->name]['logo'])) { $baseDir= ROOT .

/* enhancement */ - AD7six Upload Behaviour

2008-09-07 Thread José Pablo Orozco Marín
Im sharing the replace of double slashes and the path to convert, maybe exist a better way to achieve that. function __imConvert(&$model, $input, $params = array(), $output = null, $return = false) { if (isset($params['return'])) { $return = $params['return'];

Re: AD7six Upload Behaviour

2008-09-07 Thread Josoroma
Hi AD7six, I was wondering how to auto-delete int add action the file uploaded to {APP} after the file is converted in {IMAGES}? Just only to keep the converted file and not the original uploaded file. Now i can save my image in a single field. Based in modifications to allow using a single fie

Re: [BUG] - AD7six Upload Behaviour

2008-09-06 Thread José Pablo Orozco Marín
If I upload a file named: Bloqueo con espacios .jpg It is uploaded to uploads folder with filename bloqueo_con_espacios.jpg , but is not converted or resized in images path. If I upload a file named: Bloqueoconespacios.jpg It is uploaded to uploads folder with filename bloqueoconespacios.jp

[SOLVED] - AD7six Upload Behaviour

2008-09-05 Thread Josoroma
After almost 7 days of debuggin is done! The problem was the fullpath of the convert command, i just modified by hand the file image_upload.php, in the line 508 i added the path to convert: $command = "/usr/local/bin/convert $input $params $output"; My model is: array(

Re: AD7six Upload Behaviour - Getting close

2008-09-05 Thread Josoroma
Im using cakephp 1.2 and the behaviors: http://trac.assembla.com/cake-base/browser/branches/sample_app/app/models/behaviors/upload.php http://trac.assembla.com/cake-base/browser/branches/sample_app/app/models/behaviors/image_upload.php And im trying to upload and save the image without using the

Re: AD7six Upload Behaviour

2008-09-05 Thread José Pablo Orozco Marín
Why is so hard to share an example? I have 7 days trying to upload, resize and save an image in a single field named logo, I tried everything. This list is to help people who knows how to ask for help, and i think i asked nice for help, posting my code, trying to read the api, searching in goolge

Re: AD7six Upload Behaviour

2008-09-04 Thread Josoroma
ok im still trying and i think im close: Im my add action i have: ... $this->Test->create(); $this->data['Test']['foreign_id'] = ''; $this->data['Test']['dir'] = 'listings'; $this->data['Test']['class']= '/listings'; $this->data['Test']['filename'] = $

Re: AD7six Upload Behaviour

2008-09-03 Thread José Pablo Orozco Marín
> You can do this: > $data = array($model->alias => array('x' => $y 'filename' => > array(..))); > $this->MyModel->save($data); > > var $actsAs = array( > 'ImageUpload' => array( > 'fileFormat'=> '{$x}/{$filename}', > ) > ); Maybe an example w

Re: AD7six Upload Behaviour

2008-09-02 Thread José Pablo Orozco Marín
> You can do this: > $data = array($model->alias => array('x' => $y 'filename' => > array(..))); > $this->MyModel->save($data); > > var $actsAs = array( > 'ImageUpload' => array( > 'fileFormat'=> '{$x}/{$filename}', > ) > ); Maybe an example w

Re: AD7six Upload Behaviour

2008-09-01 Thread AD7six
On Sep 1, 7:31 am, Josoroma <[EMAIL PROTECTED]> wrote: > Hi, > > Somebody knows how to use and configure at model level the upload > behavior of AD7Six, but without using the attachments > table?http://groups.google.com/group/cake-php/browse_thread/thread/8ac41ad9... > > Any help is welcome. >

Re: AD7six Upload Behaviour

2008-08-31 Thread Josoroma
Hi, Somebody knows how to use and configure at model level the upload behavior of AD7Six, but without using the attachments table? http://groups.google.com/group/cake-php/browse_thread/thread/8ac41ad9dfd4bb7d/a1b2160874e5da48 Any help is welcome. Thanks in advance. --~--~-~--~~--

Re: AD7six Upload Behaviour

2008-08-27 Thread José Pablo Orozco Marín
Now, in my Listing Model im using: var $actsAs = array( 'ImageUpload' => array( 'fileField' => 'logo', 'allowedMime'=> array('image/jpeg', 'image/gif', 'image/png', 'image/bmp'), 'allowedExt'=> array('jpeg', 'jpg

Re: AD7six Upload Behaviour

2008-08-27 Thread Josoroma
Hi AD7Six, I was seeing your behaviors, they looks very cool and useful. I was wondering how to use the upload and image_upload behaviors without using the attachments table. ...can just be a file field in your products table, or a dedicated 'attachments' table... My field is logo, im using the