npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

picgo-plugin-sftp-uploader

v2.1.0

Published

An uploader for uploadding via SFTP

Readme

picgo-plugin-sftp-uploader

PicGo SFTP 上传插件

配置

配置分为“插件配置”和“配置文件配置”

插件配置是在插件中配置

配置文件配置是需要自行创建一个json文件进行配置

插件配置

| 名称 | 介绍 | 配置示例 | | -------- | -------------------- | -------------------- | | 网站标识 | 多个 SFTP 站的标识 | site1 | | 配置文件 | 配置文件的路径或 URL | D:/sftpUploader.json |

关于配置文件

可以是本地文件,如 D:/sftpUploader.json

也可以是网络文件,如 https://imba97.cn/sftpUploader.json

配置文件配置

配置文件是一个 json 文件,你可以在里面配置多个服务器的信息

例:

{
  "site1": {
    "url": "https://mysite1.com",
    "path": "/mysite1.com/{year}/{month}/{fullName}",
    "uploadPath": "/Web/mysite1.com/{year}/{month}/{fullName}",
    "host": "1.2.3.4",
    "port": 22,
    "username": "root",
    "privateKey": "C:/Users/imba97/.ssh/id_rsa",
    "passphrase": "private_key_password",
    "fileUser": "www",
    "dirMode": "0755"
  },
  "site2": {
    "url": "https://mysite2.com",
    "path": "/mysite2.com/{year}/{month}/{fullName}",
    "uploadPath": "/Web/mysite2.com/{year}/{month}/{fullName}",
    "host": "1.2.3.4",
    "username": "root",
    "password": "ssh_password"
  }
}

| key | 名称 | 介绍 | 配置示例 | 是否必填 | | ---------- | ------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------- | -------- | | url | 域名地址 | 图片网站的域名 | https://mysite.com | 是 | | path | 网址路径 | 图片在网址中的路径 | /uploads/{year}/{month}/{fullName} | 是 | | uploadPath | 文件路径 | 图片在服务器的真实路径 | /www/wwwroot/blog/uploads/{year}/{month}/{fullName} | 是 | | host | SSH 地址 | 一般是服务器 IP | 233.233.233.233 | 是 | | port | 端口 | 略 | 22 | 否 | | username | 用户名 | SSH 登录用户 | www | 是 | | password | 密码 | SSH 用户登录密码 | cGFzc3dvcmQ= | 否 | | privateKey | 私钥 | SSH 连接私钥 | C:/Users/imba97/.ssh/id_rsa | 否 | | passphrase | 私钥密码 | SSH 连接私钥密码 | cGFzc3BocmFzZQ== | 否 | | fileUser | 文件所属用户 | 文件的所属用户:用户组,如果跟上传用户不同可填写,用户名和用户组名相同时,可不写“:” | www | 否 | | dirMode | 文件夹 mode | 文件夹读写权限 | 0755 | 否 |

最终返回的地址是 域名地址 + 网址路径

路径 Format

路径配置可使用以下参数,使用示例:/{year}/{month}/{fullName},输出示例:/2020/01/imba97.png

| 名称 | 介绍 | 输出示例 | | -------- | -------------- | -------------------------------- | | year | 当前年份 | 2021 | | month | 当前月份 | 01 | | fullName | 图片全名 | imba97.png | | fileName | 图片名称 | imba97 | | hash16 | 图片 MD5 16 位 | 68559cae1081d683 | | hash32 | 图片 MD5 32 位 | 68559cae1081d6836e09b043aa0b3af1 | | ext | 图片后缀名 | png |

注意:除了 fullName,其他都需要自行添加后缀名

路径配置示例

网址路径文件路径 的配置示例

比如我服务器有这样一个路径:/www/wwwroot/blog/uploads/,图片在里面

我的网站根目录是 /www/wwwroot/blog/

那么我可以把 网址路径 设置为 /uploads/{year}/{month}/{fullName}

文件路径 设置为 /www/wwwroot/blog/uploads/{year}/{month}/{fullName}