Uploading file via media form fails

Created on 5 June 2024, 7 months ago

Problem/Motivation

On a new install, in D10.2 & D10.3, I can create a new media type (doesn't have to be a image type media) and use the Upload field, and I get a error "Error message: Oops, something went wrong. Check your browser's developer console for more details."

Checking the logs I see

TypeError: Drupal\flysystem\Flysystem\Adapter\CacheItem::updateMetadata(): Argument #1 ($metadata) must be of type array, int given, called in /app/web/modules/contrib/flysystem/src/Flysystem/Adapter/DrupalCacheAdapter.php on line 291 in Drupal\flysystem\Flysystem\Adapter\CacheItem->updateMetadata() (line 33 of /app/web/modules/contrib/flysystem/src/Flysystem/Adapter/CacheItem.php).

Note the file is uploaded to the server.

Steps to reproduce

drush si
drush en media flysystem_sftp -y

Add settings to a valid SFTP server in your settings.php. I copied what was in the readme and added my own server and credenails
Navigate to /admin/structure/media/manage/image/fields/media.image.field_media_image
Switch teh upload destination to your new adapter
Click Save Settings
Navigate to /media/add/image
Click CHoose FIle
Select an image
note error message.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States generalredneck Texas, USA πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024