I'm uploading an image file in a basic Django web app. There's an upload
button in the html template wrapped around by a form
tag. Once the upload
button is pressed, the underlying view
takes over and processes image upload.
In the Chrome browser of my colleague's Macbook, pressing upload
multiple times really quickly manages to call the underlying function multiples times too. I end up getting a plethora of copies of the image being uploaded.
However, this isn't replicatable in my own environment's Firefox (Ubuntu OS). Seems this issue is browser sensitive?
In any case, how do I cut off this code behavior? If the user goes into a click frenzy, I don't want multiple images to go up. Can someone guide me how to handle this in Django? I would prefer a non-JS, server solution too.
Note: Let me know if you need to see my related code.