X7ROOT File Manager
Current Path:
/opt/hc_python/share/doc/pycurl/examples/quickstart
opt
/
hc_python
/
share
/
doc
/
pycurl
/
examples
/
quickstart
/
📁
..
📁
__pycache__
📄
file_upload_buffer.py
(311 B)
📄
file_upload_real.py
(291 B)
📄
file_upload_real_fancy.py
(483 B)
📄
follow_redirect.py
(250 B)
📄
form_post.py
(564 B)
📄
get.py
(583 B)
📄
get_python2.py
(447 B)
📄
get_python2_https.py
(498 B)
📄
get_python3.py
(403 B)
📄
get_python3_https.py
(454 B)
📄
put_buffer.py
(472 B)
📄
put_file.py
(300 B)
📄
response_headers.py
(2.05 KB)
📄
response_info.py
(498 B)
📄
write_file.py
(357 B)
Editing: file_upload_real_fancy.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl c = pycurl.Curl() c.setopt(c.URL, 'https://httpbin.org/post') c.setopt(c.HTTPPOST, [ ('fileupload', ( # upload the contents of this file c.FORM_FILE, __file__, # specify a different file name for the upload c.FORM_FILENAME, 'helloworld.py', # specify a different content type c.FORM_CONTENTTYPE, 'application/x-python', )), ]) c.perform() c.close()
Upload File
Create Folder