Aug 27 - Fixed inspection lost photos recovery
This commit is contained in:
@@ -177,7 +177,11 @@ actor APIClient {
|
||||
retrying: Bool = false) async throws -> String {
|
||||
let url = try buildURL("/api/v1/photos/upload")
|
||||
|
||||
guard let imageData = FileManager.default.contents(atPath: localPath) else {
|
||||
// Read via PhotoStore, not the raw path. Stored paths embed the app
|
||||
// container UUID, which iOS reassigns on every app update — the file
|
||||
// survives, the path does not, and a raw read then fails forever on a
|
||||
// photo that is sitting right there on disk (rule 91).
|
||||
guard let imageData = PhotoStore.contents(at: localPath) else {
|
||||
throw APIError.networkError("Could not read photo: \(localPath)")
|
||||
}
|
||||
|
||||
@@ -385,7 +389,11 @@ actor APIClient {
|
||||
retrying: Bool = false) async throws -> String {
|
||||
let url = try buildURL("/api/v1/photos/upload")
|
||||
|
||||
guard let imageData = FileManager.default.contents(atPath: localPath) else {
|
||||
// Read via PhotoStore, not the raw path. Stored paths embed the app
|
||||
// container UUID, which iOS reassigns on every app update — the file
|
||||
// survives, the path does not, and a raw read then fails forever on a
|
||||
// photo that is sitting right there on disk (rule 91).
|
||||
guard let imageData = PhotoStore.contents(at: localPath) else {
|
||||
throw APIError.networkError("Could not read photo: \(localPath)")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user