logo NodeSeekbeta

telegraph图床源码分享

  • 图片13MB
    image

  • 我的图床
    wallhaven-exrqrr_3840x2160

  • @Netsky #40 可以,php文件54行改成自己的就行。

  • @nodeMJJ2023 #24 安排上了,来测试一下。

    docker run -p 8080:80 -d --restart=always baipiaoo/telegraph
    
  • image
    wp.com,不是说是tg吗,咋是wordpress的域名,tg使用了wordpress的服务?

  • We cannot complete this request, remote data could not be fetched

    改了54行,上传成功后提示

  • @Netsky #46

    修改成这样

    $imgpath = upload_image($filepath, $fileType, $file);
    if ($imgpath) {
      $image_host = 'https://你的反代域名';
      $result = array(
        "code" => 200,
        "msg" => "上传成功",
        "url" => $image_host . $imgpath
      );
    

    nginx配置反代,配置如下

    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;
    }
    
  • 最好有视频讲解下 ac10

  • @zxhawk #48 直接用docker的吧。 ac10

  • 这个图片是存在tg还是你自己服务器上的啊

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

📈用户数目📈

目前论坛共有15818位seeker

🎉欢迎新用户🎉