Hi,
When I drop a file to the filemanager, if the same file already exists, the new one will be renamed with a final 1 in its name.
How can I have a popup window that asks the user if he wants to overwrite the file or not ?
Thanks.
Hi,
When I drop a file to the filemanager, if the same file already exists, the new one will be renamed with a final 1 in its name.
How can I have a popup window that asks the user if he wants to overwrite the file or not ?
Thanks.
Hi @Herve0
You can attach onBeforeFileUpload event and check if file exists:
confirm overwrite file sample: https://snippet.webix.com/xbu5ikde
rename file sample: https://snippet.webix.com/p2tjr7p6
Also, check updated NodeJS server samples (where you can pass preventNameCollision property on the server side)
Your samples look good but the behavior should be the following one:
If the file exists, I have a confirm dialog box to overwrite it:
If answer is yes, the new file must replace the old one with same name.
Else the new file will automatically receive a new unique name (with a final 1 by default).
see my code: https://snippet.webix.com/to8kg44j
Thanks. It works now perfectly.
I just had to remove the function resolve_existent_file in CommandFileSystem.php
public function upload($path, $name, $temp){
$this->check_path($path, true, false);
//$name = $this->resolve_existent_file($path, $name);
$full = $this->check_path($path.$this->sep.$name);
…
Regards.