mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
- room composer contextual menu for selecting source - coordinator for presenting the different sources - system picker handling and URL passback - file preview after selection - feature flag
This commit is contained in:
committed by
Stefan Ceriu
parent
2359910857
commit
5f6edacc1a
@@ -31,4 +31,21 @@ extension FileManager {
|
||||
}
|
||||
try createDirectory(at: url, withIntermediateDirectories: withIntermediateDirectories)
|
||||
}
|
||||
|
||||
func copyFileToTemporaryLocation(url: URL) throws -> URL {
|
||||
let newURL = URL.temporaryDirectory.appendingPathComponent(url.lastPathComponent)
|
||||
|
||||
try? removeItem(at: newURL)
|
||||
try copyItem(at: url, to: newURL)
|
||||
|
||||
return newURL
|
||||
}
|
||||
|
||||
func writeDataToTemporaryLocation(data: Data, fileName: String) throws -> URL {
|
||||
let newURL = URL.temporaryDirectory.appendingPathComponent(fileName)
|
||||
|
||||
try data.write(to: newURL)
|
||||
|
||||
return newURL
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user