diff --git a/ios/Classes/RSIShareViewController.swift b/ios/Classes/RSIShareViewController.swift index 51c6efc0..23672b85 100644 --- a/ios/Classes/RSIShareViewController.swift +++ b/ios/Classes/RSIShareViewController.swift @@ -232,6 +232,15 @@ open class RSIShareViewController: SLComposeServiceViewController { default: name = UUID().uuidString } + } else { + let components = name.components(separatedBy: ".") + if components.count > 1 { + let fileExtension = components.last! + let baseName = components.dropLast().joined(separator: ".") + name = baseName + "-" + UUID().uuidString + "." + fileExtension + } else { + name = name + "-" + UUID().uuidString + } } return name }