MWeb端设置

  • 名称:自行取一个名称即可,做为识别用。
  • API 地址:上传图片的接口。
  • POST File Name:MWeb 是用 HTTP POST 表单的方式上传图片,这里填的是所上传图片文件的表单名称。
  • 图片 URL 路径:返回的 JSON 结果中的图片的路径,目前 MWeb 仅支持返回结果为 JSON 格式。


Chevereto

以下为chevereto-api参考返回

{
        "status_code": 200,
        "success": {
            "message": "image uploaded",
            "code": 200
        },
        "image": {
            "name": "example",
            "extension": "png",
            "size": 53237,
            "width": 1151,
            "height": 898,
            "date": "2014-06-04 15:32:33",
            "date_gmt": "2014-06-04 19:32:33",
            "storage_id": null,
            "description": null,
            "nsfw": "0",
            "md5": "c684350d722c956c362ab70299735830",
            "storage": "datefolder",
            "original_filename": "example.png",
            "original_exifdata": null,
            "views": "0",
            "id_encoded": "L",
            "filename": "example.png",
            "ratio": 1.2817371937639,
            "size_formatted": "52 KB",
            "mime": "image/png",
            "bits": 8,
            "channels": null,
            "url": "http://127.0.0.1/images/2014/06/04/example.png",
            "url_viewer": "http://127.0.0.1/image/L",
            "thumb": {
                "filename": "example.th.png",
                "name": "example.th",
                "width": 160,
                "height": 160,
                "ratio": 1,
                "size": 17848,
                "size_formatted": "17.4 KB",
                "mime": "image/png",
                "extension": "png",
                "bits": 8,
                "channels": null,
                "url": "http://127.0.0.1/images/2014/06/04/example.th.png"
            },
            "medium": {
                "filename": "example.md.png",
                "name": "example.md",
                "width": 500,
                "height": 390,
                "ratio": 1.2820512820513,
                "size": 104448,
                "size_formatted": "102 KB",
                "mime": "image/png",
                "extension": "png",
                "bits": 8,
                "channels": null,
                "url": "http://127.0.0.1/images/2014/06/04/example.md.png"
            },
            "views_label": "views",
            "display_url": "http://127.0.0.1/images/2014/06/04/example.md.png",
            "how_long_ago": "moments ago"
        },
        "status_txt": "OK"
    }

后记

之前返回的是一大堆乱码,再三测试成功上传但无法返回地址,由于月考在即,暂时搁浅。

参考

Chevereto-Documentation-APIversion1
Web自定义GitHub图床
iOS 版 MWeb 图床功能中自定义图床的使用指南