Grid – type file upload

QuestionsGrid – type file upload
Samsun asked 12 years ago

Dear master,

Samotime i need to datagrid with upload file. Would you like to inform me how wil do.

regards,
Samsun

6 Answers
Abu Ghufran answered 12 years ago

Hello,

File upload feature is in development. I'll update this ticket when it's done.

Abu Ghufran answered 12 years ago

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,

save answered 12 years ago

AN XML import file format will be appreciated!
Regards
P SAVE

Hello Abu answered 9 years ago

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 😉

Abu Ghufran answered 9 years ago

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.

Hello Abu answered 9 years ago

Hi Abu,

it works. thx very much

Your Answer

20 + 10 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?