Skip to content

[Bug]: filepond-upload-started event throws error #61

@lucas-quinn-guru

Description

@lucas-quinn-guru

What happened?

The following code doesn't have the correct syntax and throws an error when used.

$dispatch('filepond-upload-started', '{{ $wireModelAttribute }}');

I believe it should be the following.

$dispatch('filepond-upload-started', {'attribute' : '{{ $wireModelAttribute }}'});

This is found within the published vendor code.

/vendor/livewire-filepond/upload.blade.php

How to reproduce the bug

Within a livewire or volt component.

public function getListeners()
    {
        return [
            'filepond-upload-started' => 'handleFilePondUploadInProgress',
            'filepond-upload-completed' => 'handleFilePondUploadComplete',
        ];
    }

public function handleFilePondUploadComplete($name = null)
    {
        Log::info('WW Upload completed', ['name' => $name]);
    }


    public function handleFilePondUploadInProgress($name = null)
    {
        Log::info('WW Upload started', ['name' => $name]);
    }

Package Version

1.5.0

PHP Version

8.2

Laravel Version

12.28.1

Which operating systems does with happen with?

Linux, macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions