hyperscript-widgets icon indicating copy to clipboard operation
hyperscript-widgets copied to clipboard

Unable to get uploader example to work via drag and drop

Open lsmoker opened this issue 1 year ago • 3 comments

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...

lsmoker avatar Feb 12 '24 21:02 lsmoker

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 :)

benpate avatar Feb 12 '24 21:02 benpate

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

RasmusN avatar Jul 08 '24 12:07 RasmusN

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

benpate avatar Jul 08 '24 18:07 benpate