Skip to content

Instantly share code, notes, and snippets.

@Depado
Last active June 16, 2016 05:19
Show Gist options
  • Save Depado/9b292aea3d9aa0818de072af7f30617d to your computer and use it in GitHub Desktop.
Save Depado/9b292aea3d9aa0818de072af7f30617d to your computer and use it in GitHub Desktop.
Simple goploader usage with python and requests
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