Files
Milen Pivchev d68cf195cc feat: user friendly error messages (#4397)
* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* refactor: persist NKError kind and simplify user-friendly error messages

Signed-off-by: Milen Pivchev <[email protected]>

* refactor: detect virus-blocked uploads via NKError kind

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

* WIP

Signed-off-by: Milen Pivchev <[email protected]>

---------

Signed-off-by: Milen Pivchev <[email protected]>
2026-11-03 17:00:55 +01:00
..

Background upload extension

The following diagram documents the complete background-upload flow, including asset discovery, Live Photo handling, foreground chunk routing, PhotoKit job creation, server-confirmed success, automatic retries, acknowledgements, and account-level suspension.

Background upload extension flow

Routing summary

  • A regular photo or video up to 100 MB is uploaded by PhotoKit.
  • A regular resource larger than 100 MB is stored as foreground metadata and handled by the host app.
  • A complete Live Photo up to 100 MB in total creates separate PhotoKit jobs for its HEIC and MOV resources.
  • A complete Live Photo larger than 100 MB in total creates one metadata seed; the host app later extracts and uploads both components.
  • After foreground extraction, the host app recalculates the actual chunk requirement for every concrete file using the current network.

PhotoKit result handling

  • A valid oc-fileid confirms that Nextcloud committed the upload, even when PhotoKit reports the job as failed after an HTTP 204 response.
  • A failed upload is attempted at most three times in total: the initial upload and two automatic retries.
  • Authentication failures and successful responses without oc-fileid suspend the account queue immediately.
  • Three consecutive terminal asset failures without an intervening success suspend the account queue.
  • Terminal PhotoKit jobs are acknowledged only after their result has been persisted locally.