mirror of
https://github.com/immich-app/immich.git
synced 2026-02-01 00:23:45 -05:00
parent
646bb372ab
commit
df7efc4945
@ -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…
x
Reference in New Issue
Block a user