-
Notifications
You must be signed in to change notification settings - Fork 63
File `` could not be copied CannotUploadFileException #243
Comments
What is the tmp path of the file in |
gives
Using Linux |
Not too sure on this one, sorry. I would suggest debugging the paths throughout the process. As the exception is thrown in |
This also happens to me on Windows Xampp server. I can see in file the ProfferBehavior.php at line 118 I don't understand the code... Why is it looking for the fields: name, type, tmp_name, etc, in the model itself? But the entity has all that data inside the "photo" field (using default config). $tableEntityClass = $this->_table->entityClass();
if ($tableEntityClass !== null && $entity instanceof $tableEntityClass) {
$uploadList = [
[
'name' => $entity->get('name'),
'type' => $entity->get('type'),
'tmp_name' => $entity->get('tmp_name'),
'error' => $entity->get('error'),
'size' => $entity->get('size'),
]
]; |
Hi. has someone read this? |
It isn't looking in the Table class. |
i can solve this error using this plugin, and solve this error. Try it: |
Thanks @mikidiaz sounds like it's just a version issue. |
I faced the same error in cakePHP 3.5. |
@shlaing Can you share the code changes you made to see if they will solve a bug? |
Hello!
The trick was treating the entity property as an array. Hope this could help! Bye! |
hi, |
Well, that's a very broad problem @tinkeshwar. There are lots of things to check, too many to list here. I would recommend checking the documentation. |
You have to specify the "dir" field of the table:
In my case, my table have the "image_dir" wich is supposed to be filled by Proffer with the directory created by the upload process. Did you set your app like this ? |
There is no validation I have applied.
Form
On submit, it throws an exception
Directory is being created in the filesystem by file is not uploading.
The text was updated successfully, but these errors were encountered: