Hi, I have two issues with file upload.
got that inside ajax call in fileuploer.js CSRF token is missing, I have added code manually inside it as below for it,
if (KoolReport.dashboard.security.csrf) {
formData.append("_token", KoolReport.dashboard.security.csrf.token;);
}
But still faced issue in file upload, because there is a missing value in "saveToFolder" variable, which is the URL to save file, but there is no value in it,
Using below code to upload file and other fileds inside resource
protected function fields()
{
return [
ID::create("id")
->showOnCreate(0),
Text::create("name")
->validators([
RequiredFieldValidator::create()
->errorMessage("Please enter name"),
]),
Image::create("upload_file"),
];
}
Please have a look at the above 2 issues.
**I am using koolreport and dashboard in laravel.