I'm using the GetFileByServerRelativeUrl  api to update the content of a file. I don't want to create unnecessary new versions for a file. Office365 Word does not create extra versions on save without checkout.
Explanation: I'm building an app which can edit files stored on sharepoint.
- User 1 opens and edits file X (He/She chooses to not checkout the document).
- User 1 saves file X. (Version 12 is created)
- User 1 continues editing.
- User 1 saves file X. (Version 13 is created)
Since the user did not exit my app, the version should not be increased on save. The version should only increase if a User 2 edits the file while User 1 was editing.
I cannot find a way to do what Office365 does on save. To save over the last version of the file if the user did not exit my app. I'm guessing the api should allow for an additional param, like version, over which to save.. Or sessionId, to let sharepoint know my app editing session was not closed.
I already asked this question here . It looks like this is not possible with the REST api. Is there another way to do this? Maybe delete the old version of a file and "rename the version" of the latest version?