1.下载 pic
2.解压部署到你的网站
3.修改API.php
1 | #17行替换pic.coolaj.cn为你的网址 |
2 | #30行替换pic.coolaj.cn为你的网址 |
4.添加nginx反向代理
01 | location /upload { |
02 | add_header Access-Control-Allow-Origin *; |
03 | add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' ; |
04 | 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' ; |
05 | if ($request_method = 'OPTIONS' ) { |
06 | return 204;} |
07 | proxy_pass https: //telegra .ph /upload ; |
08 | } |
09 | location /file { |
10 | proxy_pass https: //telegra .ph /file ; |
11 | } |
12 | client_max_body_size 5m; |
5.Enjoy it!