benpate / hyperscript-widgets

A collectable library of of widgets and behaviors for a more hygienic web experience.
Creative Commons Zero v1.0 Universal
74 stars 6 forks source link

Unable to get uploader example to work via drag and drop #5

Open lsmoker opened 5 months ago

lsmoker commented 5 months ago

The demo site fails to display the success alert when uploading via DnD.

This line script="on htmx:afterRequest trigger upload:success" in uploader.hs does not execute. Neither is the event logged.

Uploading by clicking the button works fine.

Any ideas?

Note: htmx and _hyperscript are very new to me...

benpate commented 5 months ago

Hey LeVon, Thanks for checking this out. The uploader is just a demo of the front-end capability using hyperscript. It doesn't actually have anywhere to upload to, so it's never going to succeed. It does, however, show you what the front end experience can be using Hyperscript.

I hope this helps :)

RasmusN commented 1 week ago

I think @lsmoker is onto something. It seems like the backend call is only triggered when clicking the button and not when doing the drag and drop.

I am only able to get this popup using the button image

benpate commented 1 week ago

Gotcha. And thank you for digging into this. Sorry to overlook it the first time. I'm merging your pull request now :)