AnsweredAssumed Answered

Auto Version

Question asked by arunakumarkumarasamy on Feb 25, 2016
Latest reply on Feb 26, 2016 by kavilash23
I have to control versioning while updating the content but i could not able to reach. I tired in the following approach but it is not working me. Can anyone tel me how do achieve ?

1)var existingFile = destNode.childByNamePath(filename);
         if (existingFile !== null)
            // File already exists, decide what to do
            if (existingFile.hasAspect("cm:versionable") && overwrite)
               existingFile.ensureVersioningEnabled(false, false);
               // Upload component was configured to overwrite files if name clashes
               // Extract the metadata
               // (The overwrite policy controls which if any parts of
               //  the document's properties are updated from this)

               // Record the file details ready for generating the response
               model.document = existingFile;


2) If i add sys:temporary aspect i can able to controll but it is deleting from archive