Bulk upload isn't working and giving error file couldn't be uploaded

Created on 18 November 2022, about 2 years ago
Updated 10 August 2024, 5 months ago

Problem/Motivation

When i try to do multiple uploaded it gives an error "file couldn't be uploaded"

Steps to reproduce

Added the plugin without dropzone, then went to config>media>bulk upload
created a new configuration for "document" upload, form mode (form/media), location /sites/default/files/documents

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ› Bug report
Status

Postponed: needs info

Version

3.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • šŸ‡ŗšŸ‡øUnited States Kristen Pol Santa Cruz, CA, USA

    According to the summary, this is only when *not* using dropzone, correct? Given the module installs the media_bulk_upload_dropzonejs submodule, I'm not sure how you are not using dropzone. Marking postponed for now until more information is provided.

  • šŸ‡ŗšŸ‡øUnited States maxstarkenburg Washington, DC

    I was getting the same errors as in #2 (trying to set up media_bulk_upload 3.0.2 on core 9.5.9, having never used this module before).

    The "Upload location" field was something I skipped over when configuring my bulk media config, because (a) it wasn't required, and (b) I didn't know what to put (or frankly why I should care, if it was only temporary), e.g. should it be sites/default/files, or #4's suggestion, or temporary://, or /tmp/ or ... ? (Not to mention ... will whatever I choose work both on my local and my host?) The project page's description, README, and field description text (and perhaps placeholder or default value) could stand to offer some guidance in that regard.

    #5 was the first indication I saw that the media_bulk_upload_dropzonejs submodule existed. It didn't get enabled when I enabled media_bulk_upload or dropzonejs via drush. Was it supposed to have?

    After I enabled media_bulk_upload_dropzonejs and populated the "Upload location", things then worked. But if enabling the submodule is required, that's another place where the project page's description and README could use some updates to help us understand how we're supposed to use this module.

    But between those docs, this issue's summary, the lack of dropzonejs dependency in media_bulk_upload.info.yml, and #5, I'm confused about whether using DropZoneJS is required or just highly recommended? And if the latter, what configuration/setup allows the module to work without DropZoneJS and without also erroring ('cause I couldn't figure it out, though for my needs today, I'll just use it / enable the submodule, and move on).

  • šŸ‡ŗšŸ‡øUnited States axb

    Agreed with @maxstarkenburg, I looked in the issue queue to see if I could find some guidance with configuring the module and its dependencies. The documentation for getting started with this module would benefit from some more thorough documentation.

    Adding my notes here for other lost devs who wander here:

    Installed project ( https://www.drupal.org/project/dropzonejs ā†’ ) using "The composer way #2".

    Manually modified `composer.json` as instructed, however updated the version to 5.9

        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            },
            {
                "type": "package",
                "package": {
                    "name": "enyo/dropzone",
                    "version": "5.9.1",
                    "type": "drupal-library",
                    "dist": {
                        "url": "https://github.com/enyo/dropzone/archive/v5.9.1.zip",
                        "type": "zip"
                    }
                }
            }
        ],
    

    After running the `composer require drupal/dropzonejs enyo/dropzone` command, the DropzoneJS library was indeed installed at /libraries, e.g.:

    ā”œā”€ā”€ autoload.php
    ā”œā”€ā”€ core
    ā”œā”€ā”€ example.gitignore
    ā”œā”€ā”€ index.php
    ā”œā”€ā”€ INSTALL.txt
    ā”œā”€ā”€ libraries
        ā””ā”€ā”€ dropzone
    ā”œā”€ā”€ modules
    ā”œā”€ā”€ profiles
    ā”œā”€ā”€ README.md
    ā”œā”€ā”€ robots.txt
    ā”œā”€ā”€ sites
    ā”œā”€ā”€ themes
    ā”œā”€ā”€ update.php
    ā”œā”€ā”€ web
    ā””ā”€ā”€ web.config
    

    Then I needed to `npm run build` and sort through some node issues to get dropzone to build the minified js and css files as required by the module, e.g.:

    libraries/dropzone/dist
    ā”œā”€ā”€ basic.css
    ā”œā”€ā”€ dropzone-amd-module.js
    ā”œā”€ā”€ dropzone.css
    ā”œā”€ā”€ dropzone.js
    ā””ā”€ā”€ min
        ā”œā”€ā”€ basic.min.css
        ā”œā”€ā”€ dropzone-amd-module.min.js
        ā”œā”€ā”€ dropzone.min.css
        ā””ā”€ā”€ dropzone.min.js
    

    Once that was in place, I was able to install and enable the "dropzonejs" module in Drupal.

    Clear the caches and refresh open tabs to utitilze the installed Drupal modules and DropzoneJS installed libraries

    Finally I set up a test config at `/admin/config/media/media-bulk-config`, and uploaded some test files at `/media/bulk-upload/test_media_bulk_upload_config`. The module worked fine, functionally.

  • šŸ‡®šŸ‡¹Italy trickfun

    #7 doesn't work.
    Please provide a better guide to install this module
    Thank you

  • šŸ‡ŗšŸ‡øUnited States mr_scumbag Chattanooga TN USA

    The description from #7 skips over the values you have to put in your config at /admin/config/media/media-bulk-config

    I called mine "bulk upload image" (label)
    For the media types picked "Image"
    Form mode "none"
    upload location "public://media-bulk-upload"

    When I go to /media/bulk-upload/bulk_upload_image and drag and drop onto the "chosen files"
    I see the files uploaded and also the error "No media files have been provided."

    This is Drupal 10.3.2
    This still won't upload into /admin/content/media, but I do see them in /admin/content/files

    So something is still very broken.

Production build 0.71.5 2024