LPS-40551 Store the temporal file using a random suffix to avoid issues when uploading the same file multiple times from iOS. Then, when the document is finally saved to DocLib we remove the random suffix, and before adding it we make sure that there is no document with the same name. If a document already exists we change the title and add. Otherwise simply add it.
LPS-40551 - Source formatting