1👍
✅
Answer 1:
You forgot the closing paranthesis to join on the line above.
It should be:
open(os.path.join(settings.MEDIA_ROOT, '/media/file.txt'), 'r').read()
Answer 2: You can use httplib to upload a file (i.e. via POST request). Check out the example here (it’s short and sweet):
👤Gabe
Source:stackexchange.com