а

refresh list


#1

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


#2

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}); });


#3

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


#4

should be onUploadFile instead of onUploadComplete


#5

Perfect !!!

thank you so much


#6

Enjoy! :slight_smile: