Closed cait08 closed 10 years ago
Found the solution:
echo $this->Form->create('User', array('role' => 'form'), array('type' => 'file'));
should be
echo $this->Form->create('User', array('role' => 'form', 'type' => 'file'));
I am intermittantly having this very problem also - sometimes the uploader works aok, other times the uploaded documents are either corrupt or contain the post array... I am completely at a loss as to why and now have the job of repairing a few thousand uploads... anyone able to shed any light?
What version of Cake are you using? Maybe there was a recent change?
CAKE_VERSION 2.4.4 Php Version 5.4.22 Uploader version 4.5.2
I have just updated to latest Uploader plugin.
First: I've installed the plugin per the documentation, installing the most recent 4.x version via Composer, and including Composer in
core.php
.I'm trying to add user profile pictures to my Users model, so I added the following to my User model:
And my form (leaving out the user text fields like email)
This gives me an upload field. However, when I upload an image, it doesn't upload: The saved file just contains the HTTP PUT request with the filename, for example
Why would this be happening? AFAIK I've followed the directions exactly.