Giter Site home page Giter Site logo

evgo2017 / picgo-plugin-folder-name Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 0.0 51 KB

Use part of the local address of the file as part of the cloud address - 将文件的部分本地地址,作为部分云端地址

JavaScript 100.00%
picgo picgo-plugin

picgo-plugin-folder-name's Introduction

Hi there 👋

picgo-plugin-folder-name's People

Contributors

evgo2017 avatar

Stargazers

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

Watchers

 avatar

picgo-plugin-folder-name's Issues

单次上传多个文件时,插件不起作用

typora + PicGo + github搭建的图床
typora 版本: 0.11.18
PicGo(app) 版本:2.3.0

点击typora菜单栏的"格式" -> 图像 -> 上传所有本地图片,当上传数量超过一张时,此插件不起作用。只有1张图片,或右键某张图片上传时有效。
多张图片时PicGo日志(最后显示的文件名前少了一层目录MWA):

2022-10-12 15:15:50 [PicGo INFO] [PicGo Server] get the request {"list":["D:\WorkSpace\Utilities\MarkDown\Images\MWA\image-20221012151431469.png","D:\WorkSpace\Utilities\MarkDown\Images\MWA\image-20221012151543072.png"]}
2022-10-12 15:15:50 [PicGo INFO] [PicGo Server] upload files in list
2022-10-12 15:15:50 [PicGo INFO] Before transform
2022-10-12 15:15:50 [PicGo INFO] Transforming... Current transformer is [path]
2022-10-12 15:15:50 [PicGo INFO] Before upload
2022-10-12 15:15:50 [PicGo INFO] beforeUploadPlugins: folder-name running
2022-10-12 15:15:50 [PicGo INFO] beforeUploadPlugins: renameFn running
2022-10-12 15:15:50 [PicGo INFO] Uploading... Current uploader is [githubPlus]
2022-10-12 15:15:51 [PicGo SUCCESS]
https://cdn.jsdelivr.net/gh/star-tong/PicturesBed/img/image-20221012151431469.png
https://cdn.jsdelivr.net/gh/star-tong/PicturesBed/img/image-20221012151543072.png

与rename-file冲突

同时安装folder-name与rename-file时folder-name隐藏path规则不起作用,不知到底那个插件影响那个

为什么开启了插件后上传路径未改变?

我的测试文件 test.md 位置为 D:\Users\Lenovo\Desktop\test.md,在 Typora 的 偏好设置 -> 图像 中,不管是

  1. 开启了 插入图片时自动上传 然后在文档中粘贴图片,还是
  2. 不开启自动上传然后在粘贴完图片后右键手动上传,

这两种方式 PicGo 返回的 URL 都没有包含父文件夹名称。我已经在插件中设置 向上层数 为1,忽略名称 没有填写,如图:

image

所以我想这样设置后,PicGo 上传的路径应该为类似 https://cdn.jsdelivr.net/gh/burgessx/imgbed@main/img/Desktop/20210412134726.png 才对,然而实际上为 https://cdn.jsdelivr.net/gh/burgessx/imgbed@main/img/20210412134726.png

下面是我的一种 Typora 设置:

image

初次使用 PicGo,望不吝赐教,感谢~

图片的高度影响上传路径

typora + PicGo + github搭建的图床
typora 版本: 1.3.8
PicGo(app) 版本:2.3.1-beta.6

测试过程中发现,不同的图片上传的路径不一样,主要为以下两种情况。

  1. 图片高度小于阈值(未测试)时,图片上传的路径符合预期;

  2. 图片高度高于阈值(未知)时,图片上传的路径会变为picgo的如下路径:

    C:\Users\Administrator\AppData\Roaming\picgo

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.