Dear master,
Samotime i need to datagrid with upload file. Would you like to inform me how wil do.
regards,
Samsun
Hello,
File upload feature is in development. I'll update this ticket when it's done.
File upload feature is now available as a part of premium version and onward.
Customers having active subscription can get latest build via email request at [email protected]
Regards,
Hello Abu,
I searched several posts, but didn't find the hint for my problem.
I'm using the file upload (works so far), but the filename is inserted into the database including the upload_dir ($col["upload_dir"]). That leads to problems with the generated links to the file.
Any idea for me? Classical dummy user problem? I hope not 😉
You can remove the path using on_insert callback. e.g.
$e["on_insert"] = array("add_invoice", null, true);
$g->set_events($e);
function add_invoice($data)
{
$upload_file_path = $data["params"]["note"];
// if file is uploaded
if ($upload_file_path)
{
$f = pathinfo(realpath($upload_file_path));
$filename = $f["basename"];
$data["params"]["note"] = $filename;
}
}
here 'note' is upload field.
Refer demos / editing / file-upload.php code for callbacks.