Giter Club home page Giter Club logo

telegraph-image-hosting's Introduction

Telegraph-Image-Hosting

Build a free image hosting with Telegraph

Important

This project is no longer maintained. Interested friends can deploy it on platforms like Cloudflare Workers or Vercel based on this idea.

Features

  • Free
  • Unlimited bandwidth (It will consume the traffic of your VPS)
  • No censorship (NSFW image can be uploaded)
  • You can upload any file, not just image files

Disadvantages

  • Single file cannot exceed 5MB
  • Access speed may not be ideal in China Mainland

Current Strategy (Recommended)

Full enable HTTPS

Client -> Cloudflare Server (Optional) -> Your VPS (Example: Oracle Cloud) -> Telegraph Servers (NL) 

Demo Site

missuo.ru

bacd124a30fb599596f13

Deployment

Preparation

  • a Domain (Make sure it's not blocked by GFW)
  • an overseas VPS (Make sure you can access Telegraph)
  • Install Nginx

Configure Nginx

I don't talk too much about simple steps such as domain name resolution and SSL certificate application.

location /upload {
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
            add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
            if ($request_method = 'OPTIONS') {
                return 204;}
            proxy_pass https://telegra.ph/upload;
}
location /file {
            proxy_pass https://telegra.ph/file;
}

client_max_body_size 5m;

Note: Remove all other useless location related configuration and just keep the two above.

With uPic for macOS/iOS

Thanks to my best friend Svend (author of uPic) for guiding the configuration scheme

  1. You can change the API URL and Domain to your own.

7e28f947345cba3709835

  1. Don't forget to click on the Other fields to add the header information.

7516a06df832d1897922a

  1. Connect your server by SSH, then enter your web directory.
cd /www/wwwroot/xxx.com
  1. Download the source code on GitHub with wget.
wget https://raw.githubusercontent.com/missuo/Telegraph-Image-Hosting/main/index.html
  1. Modify the API https://missuo.ru/upload to your domain.

  2. Have fun.

Finally

There is no guarantee that the Telegraph will work all the time, as it is on the GFW list. However, when you can use it, make sure to cherish it!

Author

Telegraph-Image-Hosting © Vincent Young, Released under the MIT License.

telegraph-image-hosting's People

Contributors

missuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

telegraph-image-hosting's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.