Problem

When adding new file_entity files through entity_browser, custom fields on the file entity are not exposed.

#2656400: Add entity browser widget for file and image fields began this process, but left a sweet UX improvement undone: "The second step would be integrating the file add form/fields when uploading new fields, haven't looked into that yet."

This has caused some confusion, for instance #2679637: Creating file entities doesn't display a form to edit the entity itself.

Workaround

Selecting the "Edit" operation after the file has been uploaded exposes the entity fields.

Edit operation

Exposed custom fields

However, this is not helpful if you want to have required fields on the file entity.

Proposed solution

Provide an EntityBrowserWidget plugin designed to integrate file_entity more completely.

CommentFileSizeAuthor
exposed_custom_fields.png97.72 KBakalata
eb_image.png151.39 KBakalata
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

akalata created an issue.

John Pitcairn’s picture

I'm having reasonable success by using the inline entity form plugin to handle (media) uploads, instead of the provided media image widget. The form display mode is used, custom/required fields are presented as expected, file destination and restrictions seem to be honored.

Might that work for straight file entities too?