I was looking at this https://github.com/ImaginaryBIT/Python_HTTP_Server. It is a website with a directory that allows you to get, put, and post files to/from the directory. I am trying to modify it to have a delete request. I am having some trouble with what to do exactly. I have looked at some other Stack Overflow posts and they say that you have to use JavaScript for a delete request in the form that I was trying to use. I am not sure how true that is. I was trying to use only python/html.
line 154 f.write(b"<form ENCTYPE=\"multipart/form-data\" method=\"post\">")
line 155 f.write(b"<input name=\"file\" type=\"file\"/>")
line 156 f.write(b"<input type=\"submit\" value=\"upload\"/></form>\n")
I was trying to use this format because it creates the buttons in the picture
I was trying to do something similar with the delete. Choose and file to delete and hit another button called delete. I would prefer if the user is somehow limited to choosing a file in the directory I have seen the requests.delete in python that has something to do something with JSON, but I don't know if that would be relevant to what I'm trying to do.