Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.
/ Filehost Public archive

lets you upload images which are stored in a db and can be accessed later. For temporary hosting since Heruku clears db every couple hours

License

Notifications You must be signed in to change notification settings

FusionSid/Filehost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File storage API

this is a temporary file hosting, the db does get cleared every so often. I might add a longer file host option but for now probably use this if you want to host a file for like a couple hours/minutes

Supported file types: png, txt, jpeg, gif, mp4, mp3
Max file size: 15mb


Base URL: https://file-host.herokuapp.com/ (redirects to docs)

DOCS: https://file-host.herokuapp.com/docs


Upload:

import requests

url = "https://file-host.herokuapp.com/api/upload?file_type=png" # check file types above

files = {'file': open('file.png', 'rb'),}
r = requests.post(url, files=files)
print(r.json()) 

Example Output:

{
  "code": "uVIhGXvQ",
  "url": "https://file-host.herokuapp.com/api/file?code=uVIhGXvQ"
}

Get File:

You can either use the url tht was returned when you made uploaded the file or if you have the code you do: https://file-host.herokuapp.com/api/image?code={The code}


Rate limits:

GET /api/file This endpoint is limited to 69 get files requests per minute

POST /api/upload This endpoint is limited to 42 uploads per minute


Also if you're using Why Bot, You can use the command ?filehost

About

lets you upload images which are stored in a db and can be accessed later. For temporary hosting since Heruku clears db every couple hours

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published