I would really like to thank everyone for their valuable input.
See, as per the discussion so long, I would like to make some things
clear. I have a picture column that saves the filename and also a dir
column that saves the directory root. I have set the upload path to
img{DS}tablets. that saves the directory info like " img/tablets "
into the dir column.
I tried various combination, at last finalized with this:
<?php echo $html->image('..' . DS . 'img' . DS . 'tablets'. DS .
$medicine['Medicine']['picture']); ?>
Now, It works great.
Thanks to All.
Regards,
Jayesh
On Apr 14, 8:46 am, Vitor Pacheco <[email protected]> wrote:
> the default path for the upload is "uploads{DS}{ModelName}{DS}{fieldName}"
> if you do not set another path in the model, or is not being saved in the
> database try using this path echo $this->Html->image('..' . DS . 'uploads'.
> DS. 'model'. DS. 'field' . DS 'file.png');
>
> 2011/4/13 Mr.Jayesh <[email protected]>
>
>
>
>
>
>
>
>
>
> > Hi Mates,
>
> > As while working on my project, I am using meioupload behaviour for
> > handling image upload. I have set it as per the documentation provided
> > in their site. I have four fields: picture, dir, mimetype, filesize.
> > There is no error in uploading. But the problem is, the picture field
> > only stores the file name. I have set a folder under img to store the
> > files. The files get stored correctly into the directory.
>
> > The issue is, how will I be able to echo the image on the view. The
> > echo only states the img/filename.extn ..... but this will not show
> > the image. How can I configure the meio to store the dir name in the
> > picture column so I can get proper file root.
>
> > Is it something I am doing wrong.
>
> > Regards,
> > Jayesh
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group
> > athttp://groups.google.com/group/cake-php
>
> --
> *Vitor Pacheco*
> *71 8626-7909
> 71 3378-5778
> **71 3287-3475***
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php