ctessier / nova-advanced-image-field

🌄 📐 A Laravel Nova advanced image field with cropping and resizing using Vue Advanced Cropper and Intervention Image
https://novapackages.com/packages/ctessier/nova-advanced-image-field
MIT License
100 stars 26 forks source link

File change doesn't work anymore from Nova v4.22.0 #96

Closed eullercdr closed 1 year ago

eullercdr commented 1 year ago

@ctessier Can you tell me why the package is not working anymore? I'm using the latest version of Nova.

ctessier commented 1 year ago

Hi @eullercdr What version of the package are you running?

eullercdr commented 1 year ago

@ctessier I am using the version ctessier/nova-advanced-image-field": "^2.0

ctessier commented 1 year ago

OK You should be a little more specific though...

What doesn't work anymore? Which version of Nova? What error do you get? What does you resource class look like? What is your version of PHP?

mziraki commented 1 year ago

@ctessier it's v4.22.0, it's working on v4.21.0

ctessier commented 1 year ago

I can't reproduce any issue with Nova v4.22.0

Guys! Give me a little more to work from, here! What doesn't work anymore? What error do you get? What does you resource class look like? What is your version of PHP?

puzzledmonkey commented 1 year ago

it doesn't work with Nova 4.22.0 because they changed the behaviour of DropZone image in short, you need to update to use @file-changed="handleFileChange" instead of just @change="handleFileChange" presumably you can use both of them to ensure backwards compatibility too?

puzzledmonkey commented 1 year ago

https://github.com/ctessier/nova-advanced-image-field/pull/97

I've tested and with the @change line kept as well as the new @file-changed line, it works in Nova <4.22.0 too.

:)

ctessier commented 1 year ago

Thank you @puzzledmonkey

I'll have a look at your PR asap! I didn't have any issue while choosing a file, is only the dropzone affected?

puzzledmonkey commented 1 year ago

it doesn't work for me when choosing a file or when dropping a file on the dropzone.

you might have another plugin installed that's overwriting the dropzone code i guess? but here i had no luck with any uploading until i added that @file-changed line.

ctessier commented 1 year ago

Thank you very much @puzzledmonkey ! I was able to reproduce. I will publish a new version with your fix!

Good work, thank you!

ctessier commented 1 year ago

This issue was fixed in v2.0.2. Thank you @puzzledmonkey for your contribution 😉

Woeler commented 1 year ago

Cheers for fixing this. Ran into it myself.