Last active
June 16, 2016 05:19
-
-
Save depado/9b292aea3d9aa0818de072af7f30617d to your computer and use it in GitHub Desktop.
Simple goploader usage with python and requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "https://gpldr.in" | |
files = {'file': open('path/to/file', 'rb')} | |
# Sending a file with defaults configuration | |
r = requests.post(url, files=files) | |
print(r.text) | |
# Sending a file and specify it is visible only once | |
r = requests.post(url, files=files, data={"once":"true"}) | |
print(r.text) | |
# Sending a file and specify it is visible only once, and specify the duration | |
r = requests.post(url, files=files, data={"once":"true", "duration": "1d"}) | |
print(r.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment