Change file name when upload.

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

Hello,

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 7 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 7 years ago

Right, my fault. Thank you.

Your Answer

5 + 19 =

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?