Cant upload bulk to aws

Created on 15 July 2024, 4 months ago

Problem/Motivation

Using Drupal 10.2.6 with PHP 8.2.15

This issue arose while using media_library_bulk_upload with s3fs modules. When trying to bulk upload multiple video files, we were confronted with an ajax error with the drupal log error:

An error occurred when uploading a file: Error executing "CopyObject" on ""; AWS HTTP error: Client error: `PUT ` resulted in a `400 Bad Request` response

This was due to the #upload_location using public://YYYY-MM instead of "temporary://". Switching this out for the former solved the issue for uploading our files. Not sure if this is the appropriate way to do this or make it a configurable value, but wanted to put this here in case anyone else has this same issue.

Steps to reproduce

1. Install modules "" and "s3fs" and configure a bucket on s3 to have files copied to but not have new directories created.
2. Bulk upload some files and you could receive the error above.

Proposed resolution

Attaching a patch file for this for review

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States peachez

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

Comments & Activities

Production build 0.71.5 2024