Change file name when upload.

QuestionsChange file name when upload.
ALÉN asked 3 years ago


I want to change the name of the file when I upload it. Can I create a new name for the file somewhere ?

The col code:

$col = array();
$col["title"] = "Picture1";
$col["name"] = "Picture1";
$col["align"] = "left";
$col["width"] = "12"; /
$col["editable"] = true;
$col["edittype"] = "file";
$col["upload_dir"] = $files;
$col["show"] = array("list" => false, "edit" => true, "add" => true);
$cols[] = $col;

Thank you.

2 Answers
Abu Ghufran answered 3 years ago

You need to use on_insert / on_update event handler and rename file there.
For demo code, refer demos/editing/file-upload.php

Alén answered 3 years ago

Right, my fault. Thank you.

Your Answer

13 + 8 =

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 / 5. Vote count:

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

Let us improve this post!