cocoakekeyu / markdown-img-paste

一个可以快速粘贴剪贴板里的照片到markdown的插件,并且可以设置使用七牛存储照片。
MIT License
179 stars 28 forks source link

Uncaught TypeError: Cannot read property 'url' of undefined #35

Closed spongeb0b724 closed 4 years ago

spongeb0b724 commented 5 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.40.1 x64 Electron: 3.1.10 OS: Unknown Windows version Thrown From: markdown-img-paste package 0.3.11

Stack Trace

Uncaught TypeError: Cannot read property 'url' of undefined

At C:\Users\10431\.atom\packages\markdown-img-paste\lib\markdown-img-paste.coffee:78

TypeError: Cannot read property 'url' of undefined
    at Request._callback (/packages/markdown-img-paste/lib/markdown-img-paste.coffee:78:53)
    at Request.self.callback (/packages/atom-beautify/node_modules/request/request.js:185:22)
    at Request.emit (events.js:182:13)
    at /packages/atom-beautify/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:182:13)
    at /packages/atom-beautify/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1090:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Commands

     -1:31 application:open-file (div.panels-item)
  8x -1:15.1.0 markdown-img-paste:paste (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
autocomplete-paths 2.12.2 
color-picker 2.3.0 
docblockr 0.13.7 
emmet 2.4.3 
file-icons 2.1.35 
git-plus 8.7.1 
markdown-img-paste 0.3.11 
markdown-preview-enhanced 0.16.3 
markdown-themeable-pdf 1.2.1 
markdown-writer 2.11.9 
minimap 4.29.9 
simplified-chinese-menu 5.3.5 
terminal-plus 0.14.5 
cocoakekeyu commented 4 years ago

作者刚吃土归来。

这里是上传 sm.ms 失败,具体得看网站返回了什么内容,源代码在控制台有打印信息:

image

spongeb0b724 commented 4 years ago

作者你好!我看他它已经显示OK, image upload to sm.ms!,然后报了这个错,好像上传成功了返回的url没有获取到

cocoakekeyu commented 4 years ago

不知道你那边是否有新的错误格式,我这边测试 OK 。 需要你打开开发者面板看下。打开方式:

image

这里有打印上传接口返回的信息:

image

spongeb0b724 commented 4 years ago

作者你好!我感觉应该是sm.ms的限制问题,之前这个问题卸载重装就可以了,使用插件在一个markdown文档里粘贴的图片超过10张以后就会报这个错误。手动上传一分钟最多20张,否则会报Flood detected. You can only upload 20 images per minute,但是这个插件过了半小时还是会报这个错,不知道怎么解决。 报错信息

cocoakekeyu commented 4 years ago

看起来 sm.ms 开始收费了。七牛也要绑定自己的域名。

接下来:

  1. 寻找新图床
  2. 自定义配置本地图片目录