refresh list

Hi !
I rename the file after the upload .
How can I force a refresh of the file list ?
Thanks

Hi

first modify your response, for example:

print_r(json_encode(array( "state" => true, "name" => $filename, "extra" => array( "name" => "new_filename.jpg" // <-- new name, will be set in list after upload ) )));

then on client side:

myVault.attachEvent("onUploadFile", function(data, extra){ myVault.list.updateFileNameSize(data.id, {name: extra.name}); });

Hi Andrei !
I modified upload.php and the client side

client side

unfortunately I get this error

TypeError: extra is undefined
myVault.list.updateFileNameSize(data.id, {name: extra.name});

Upload_handler.php response is

but firebug for data show

where am I doing wrong ? Thanks for your attention

Product Name: dhtmlxVault
Version: 2.4.1
Edition: Standard

should be onUploadFile instead of onUploadComplete

Perfect !!!

thank you so much

Enjoy! :slight_smile: