Skip to content

Cannot edit read-only files, manage file page assumes that all files are writeable #7036

@DevinCarlson

Description

@DevinCarlson

Description of the bug

Backdrop displays a "Replace file" option for all files on the file manage page, assuming that all files are writeable. When editing a file that uses a non-writeable stream wrapper (oEmbed resource, YouTube video, etc.), an error is displayed on form submission because it is not possible to replace the file.

In Drupal 7, the File Entity module checked to ensure that a file is writeable before giving the user the option to replace the file or change its scheme/destination.

Steps To Reproduce

To reproduce the behavior:

  1. Add a file that uses a read-only/non-writeable stream wrapper such as a YouTube video.
  2. Go to the file manage page for that file (file/{fid}/manage).
  3. Submit the form by pressing the "Save" button.

Actual behavior

An error is displayed.

Expected behavior

The form should submit successfully without displaying an error.

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