ali3nado/CakePHP-JqueryFileUpload-Plugin

Error Not Found

Opened this issue · 2 comments

G00z commented

Hello, im using your plugin, but i have an issue, when i add files to upload, i can see the miniature correctly in preview, when i want upload the files i see this message:

error Not Found,

Need to change some path ?

For example my action is: /products/view in the function view is where i save the image in app/webroot/images

In my view.ctp i put this
not found

echo $this->UploadScript->loadLibs();
echo $this->Html->scriptBlock("
$(function () {
$('#fileupload').fileupload({
xhrFields : {withCredentials: true},
url : '/admin/products/view/' //Set your action
});
});
");

I'm doing wrong? I hope you can help.

Thanks.

Você deu permissão de escrita e leitura no diretório onde está salvando as imagens? Veja se o upload funcionou e de uma olhada no arquivo de log do Cake.

G00z commented

Hello, yes, im in a localhost, and my directory names has permissions correctly to save images, i saw my error was in the url: /admin/products/view/ WRONG

url: https;//localhost/my_project/admin/products/view/ CORRRECT.

But now i have a new issue, SyntaxError: JSON.parse.

Thank you for you response.