Skip to main content

Free unlimited file hosting using Discord server

Project description

pyscord-storage

Free unlimited file hosting using Discord server


Installation

pip install pyscord-storage --upgrade

Example

Default
import pyscord_storage


filename = "ynm.jpg"
file = "https://raw.githubusercontent.com/animemoeus/pyscord-storage/master/sample.jpg"
# file = 'path/to/your/file'

data = pyscord_storage.upload(filename, file)
If you need to use custom http headers for get the file from URL, you can use the custom http headers like this:
import pyscord_storage

custom_headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
        "Referer": "pyscord-storage",
        "Custom-Header": "Lorem Ipsum Dolor Sit Amet",
    }

filename = "ynm.jpg"
file = "https://raw.githubusercontent.com/animemoeus/pyscord-storage/master/sample.jpg"
# file = 'path/to/your/file'

data = pyscord_storage.upload(filename, file, custom_headers)

Note: Try to change the User-Agent header if you get blocked by firewall rules when using the custom_headers.

Result

{
  "status": 200,
  "data": {
    "id": "860049950065819658",
    "filename": "ynm.jpg",
    "size": 130407,
    "url": "https://cdn.discordapp.com/attachments/858938620425404426/860049950065819658/ynm.jpg",
    "proxy_url": "https://media.discordapp.net/attachments/858938620425404426/860049950065819658/ynm.jpg",
    "width": 537,
    "height": 954,
    "content_type": "image/jpeg"
  }
}

API

About

Increase Upload Limit

Example Implementation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyscord-storage-0.1.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyscord_storage-0.1.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pyscord-storage-0.1.3.tar.gz.

File metadata

  • Download URL: pyscord-storage-0.1.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.7.1 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

File hashes

Hashes for pyscord-storage-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d14a5eadc0d4f455c03695c2c8d5fd8693a94d1655f16c7e8fa0785a95ebb03c
MD5 0b67ea2d6456a33e957d2f08d2ef89c1
BLAKE2b-256 f9ab08de052d20009dc1b21460995f02fee368be3225b68c9dd78d5a029dc9f0

See more details on using hashes here.

File details

Details for the file pyscord_storage-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyscord_storage-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.7.1 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

File hashes

Hashes for pyscord_storage-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f9882d17666762e3d70f6284b97478ba7b98ce51b108d906f84059d84c56e666
MD5 59f060c25258d08dab850014ca6c63cf
BLAKE2b-256 72e9eab2fcd0b8cd475b5d4086f0321124ec78142265883ae0802b5250168ff3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page