Note that there are some explanatory texts on larger screens.

plurals
  1. POcakephp milesj uploader plugin: image is not uploading to destination directory
    primarykey
    data
    text
    <p>I'm using <code>cakephp uploader 4.3.1</code> plugin from <code>milesj.me</code>. I installed it using the <code>composer</code> its working properly.</p> <p>Now the problem is when i upload an image one entry is added to the database with image path but i couldn't find the image in the destination folder.</p> <p>the <code>Model-&gt;save</code> function is executing successfully.</p> <p>I'm using <code>cakephp 2x</code></p> <p><strong>EDIT</strong></p> <p>if i dont give destination directory the files will be uploaded to <code>/files/uploads</code> directory and i can find the images there!!!!!!!!!! </p> <p>but when i give destination as <code>/img/uploads</code> i couldn't find.</p> <p><strong>Model Code</strong> <code>CustomImage.php</code></p> <pre class="lang-php prettyprint-override"><code>&lt;?php App::uses('AppModel', 'Model'); class CustomImage extends AppModel { public $name = 'CustomImage'; public $actsAs = array( 'Uploader.Attachment' =&gt; array( 'upload_image' =&gt; array( 'uploadDir' =&gt; '/img/uploads/', 'finalPath' =&gt; '/img/uploads/', 'dbColumn' =&gt; 'path', 'maxNameLength' =&gt; 30, 'overwrite' =&gt; true, 'stopSave' =&gt; true, 'allowEmpty' =&gt; false, 'transforms' =&gt; array( array('method' =&gt; 'resize', 'width' =&gt; 240, 'dbColumn' =&gt; 'photo_thumb')) ) ), 'Uploader.FileValidation' =&gt; array( 'upload_image' =&gt; array( 'extension' =&gt; array('gif', 'jpg', 'png', 'jpeg'), 'required' =&gt; true ) ) ); } ?&gt; </code></pre> <p><strong>Controller Code</strong> <code>MotionMakerController.php</code></p> <pre class="lang-php prettyprint-override"><code>class MotionMakerController extends AppController { public $helpers = array('Html','Form'); public $uses = array('CustomImage'); public function index() { } public function add() { if ($this-&gt;CustomImage-&gt;save($this-&gt;request-&gt;data, true)) { echo "success"; } } } </code></pre> <p><strong>View Code</strong> <code>add.ctp</code></p> <pre class="lang-php prettyprint-override"><code>&lt;?php echo $this-&gt;Form-&gt;create('CustomImage', array('type' =&gt; 'file')); echo $this-&gt;Form-&gt;input('upload_image', array('type' =&gt; 'file')); echo $this-&gt;Form-&gt;end('Submit'); ?&gt; </code></pre> <p>Please help me.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload