question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropping an image into my form submits the form

See original GitHub issue

I have an inplace summernote widget for leaving comments. If I drag and drop a picture onto the form, it appears in the widget, cool. But in addition to uploading the image, it’s also posting my form in the background and that’s causing duplications of comments. It’s shows 404, but the comment is still appearing somehow (why is it submitting the form anyway?)

[08/May/2019 21:53:14] "POST /summernote/upload_attachment/ HTTP/1.1" 200 185
Not Found: /quests/submission/15/complete/
[08/May/2019 21:53:15] "POST /quests/submission/15/complete/ HTTP/1.1" 404 1772
[08/May/2019 21:53:15] "GET /media/django-summernote/2019-05-08/3485d494-cc80-4438-b769-67345ad9bdd8.png HTTP/1.1" 200 7085

My form doesn’t visibly change except for the picture appearing. But if I submit, it ends up being submitted twice (or if I cancel without submitting, it’s already been submitted once).

Actually, If I keep dropping new images into the form, it submits the form (in secret) for every image. So I end up with tons of extra comments!

Any idea why this might be happening or how I can prevent it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tylerecouturecommented, May 16, 2019
0reactions
tylerecouturecommented, Jan 16, 2020

This seems to be fixed now? At least now that I’ve upgrade to django 2.2 and the latest django-summernote.

Read more comments on GitHub >

github_iconTop Results From Across the Web

html5 drag and drop files - upload when entire form is submitted
Is it possible to include "drag and drop'd" files in a form submission? There are plenty of options for uploading asynchronously.
Read more >
Simple Drag and Drop File Upload Tutorial - YouTube
Your browser can't play this video. ... In today's video I'll be showing you how to create a "drag and drop " file...
Read more >
Edit your form - Google Docs Editors Help
In Google Forms, open a form. Click a question or answer. ... Upload or choose an image. Click Select. Add an image or...
Read more >
Browsers dropping support for input type="image"? - SitePoint
I was making a form today with a submit input of type=“image”. But rather than submit the form, the page just kept refreshing...
Read more >
Drag and drop files in forms - monday Community Forum
When creating a form and adding a question for a files column it would be much more useful for users to be able...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found