How to replace an existing file with latest version in move Node API call

cancel
Showing results for 
Search instead for 
Did you mean: 
sdhanekula
Customer

How to replace an existing file with latest version in move Node API call

Jump to solution

Hi,

I'm trying to move a PDF from one folder to another folder. If the name of the PDF does not match with any of the PDFs in the destination folder, then it's working fine. But, if the destination folder contains a PDF with the same name, then I'm getting an exception saying that "New name clashes with an existing node in the destination parent folder". Is there a way to update the existing node latest version of the PDF?

Thanks,
Saikiran

1 Solution

Accepted Solutions
afaust
Master

Re: How to replace an existing file with latest version in move Node API call

Jump to solution

Not with a move call because then it would no longer be a move, rather a merge. Your client should check before the move whether a similarly named node exists in the target and then either do the move or perform an update on the existing one (after which the node in the source folder would probably need to be deleted).

View solution in original post

1 Reply
afaust
Master

Re: How to replace an existing file with latest version in move Node API call

Jump to solution

Not with a move call because then it would no longer be a move, rather a merge. Your client should check before the move whether a similarly named node exists in the target and then either do the move or perform an update on the existing one (after which the node in the source folder would probably need to be deleted).