mirror of
https://github.com/samsonjs/immich.git
synced 2026-03-25 09:15:56 +00:00
parent
646bb372ab
commit
df7efc4945
1 changed files with 1 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ class RemoteImageApiImpl: NSObject, RemoteImageApi {
|
|||
static let session = {
|
||||
let cacheDir = FileManager.default.temporaryDirectory.appendingPathComponent("thumbnails", isDirectory: true)
|
||||
let config = URLSessionConfiguration.default
|
||||
config.requestCachePolicy = .returnCacheDataElseLoad
|
||||
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "unknown"
|
||||
config.httpAdditionalHeaders = ["User-Agent": "Immich_iOS_\(version)"]
|
||||
try! FileManager.default.createDirectory(at: cacheDir, withIntermediateDirectories: true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue