Skip to content

Revisit ACTION_OPEN_DOCUMENT workaround when Chromium fixes ERR_UPLOAD_FILE_CHANGED #447

@jkmassel

Description

@jkmassel

Context

PR #415 switched the Android WebView file chooser from ACTION_GET_CONTENT to ACTION_OPEN_DOCUMENT to work around a Chromium bug where proxy URIs returned by the Android 13+ Photo Picker report inconsistent last_modified metadata, triggering ERR_UPLOAD_FILE_CHANGED validation failures.

Chromium bug: https://issues.chromium.org/issues/40123366

Details

  • On Android 13+, ACTION_GET_CONTENT for image/video MIME types is intercepted by the system Photo Picker, which returns content://media/picker/... proxy URIs.
  • These proxy URIs report different last_modified values between queries, which Chromium's WebView treats as the file having changed mid-upload.
  • The error only occurs in Android WebView, not in Chrome browser directly.
  • ACTION_OPEN_DOCUMENT bypasses the Photo Picker and routes to DocumentsUI, which returns stable content://com.android.providers.media.documents/... URIs that don't trigger the bug.

Why track this

ACTION_OPEN_DOCUMENT works but presents a different file picker UI (DocumentsUI instead of the Photo Picker). If/when the Chromium bug is resolved, we should evaluate switching back to ACTION_GET_CONTENT to give users the more modern Photo Picker experience.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions