[issue42004] Allow uploading files with SimpleHTTPRequestHandler

2020-10-10 Thread Javier Ayres


New submission from Javier Ayres :

Hello. I'm a big fan of the http.server module to quickly serve some files in a 
local network with `python3 -m http.server`. I regularly needed to get some 
files from other people too, but getting everyone to install/run python3 was 
not such a simple task. Eventually I wrote a subclass of 
SimpleHTTPRequestHandler that added a form with a file input and accepted POST 
requests, so people could also upload files to my computer. I think this would 
be a fine addition to SimpleHTTPRequestHandler, so I'm attaching a potential 
patch that implements this and adds a new cli parameter so this feature is only 
enabled explicitly.

--
components: Library (Lib)
files: patch
messages: 378418
nosy: lufte
priority: normal
severity: normal
status: open
title: Allow uploading files with SimpleHTTPRequestHandler
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file49506/patch

___
Python tracker 
<https://bugs.python.org/issue42004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42004] Allow uploading files with SimpleHTTPRequestHandler

2020-10-12 Thread Javier Ayres


Javier Ayres  added the comment:

I see. To be honest I didn't know FieldStorage at all, it was the best way I 
found of dealing with file data in requests using just the standard library. If 
you think this feature makes sense and it could be included, I could look into 
removing the FieldStorage dependency.

--

___
Python tracker 
<https://bugs.python.org/issue42004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com