Description
When uploading an attachment using the REST Api, the attachment is saved twice in the page (it generates 2 versions)
Steps to reproduce:
- curl -u "Admin:admin" -X PUT --data-binary "@foo.txt" http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome/attachments/foo.txt
Result: The foo.txt attachment in the Main.Webhome page has version 1.2 instead of version 1.1
This bug appeared during the 2.5-SNAPSHOT development cycle and doesn't affect previous versions.