Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
upload-image-to-oss
Advanced tools
Auto upload image to oss when copy image, and return the link of image
A tool to upload picture(copy or cut) which stored in clipboad to OSS, and return a url link, we can use this url to visit the picture, which may be convenient when add a picture in markdown.
# Server Mode: We support "OSS" and "Apache Server" Now
## You can specify "OSS" or "Apache"
mode=OSS
# Aliyun Object Storage Service (OSS)
## bucket 所在的区域, 默认 oss-cn-hangzhou
region=******
## 通过阿里云控制台创建的access key。
accessKeyId=******
## 通过阿里云控制台创建的access secret
accessKeySecret=******
## 通过控制台创建的bucket, 或通过putBucket创建
bucket=******
# Apache Sever
## Server IP, 默认是localhost
serverIP=localhost
## Server的ssh端口, 默认是22
sshPort=22
## Server 的账户
account=******
## 账户对应的密码
password=******
## 图片所处的目录, 默认是/var/www/html/images
imagesDirectory=/var/www/html/images
## 访问图片的url, 设置之后可以访问到所有图片,并可以修改图片名称
imagesUrl=/images
## Apache Server 对应的端口, 默认是80
serverPort=80
This plugin support OSS and Apache Server, specify the infomation of server which you choose to store the pictures.
If you choose mode equal to OSS, then the Picture will upload to the OSS else mode equal to Apache, and the Picture will upload to the Apache Server
$ sudo apt-get install xclip
If want to upload the pictures to apache server, you should install sshpass plugin.
$ sudo apt-get install sshpass
More detail information about xclip
More detail information about sshpass
$ npm i upload-image-to-oss
import start from 'upload-image-to-oss'
start(['ctrl', 'alt', 'u'])
When the type of content stored in clipboard is picture, and if you press ctrl+alt+u
,the picture will be uploaded to the specified OSS, and the link will store in clipboard, so you can use ctrl+v
to get the link.
v1.0.7(20 Aug 2018)
v1.0.8(22 Aug 2018)
v1.0.9(09 Sep 2018)
FAQs
Auto upload image to oss when copy image, and return the link of image
The npm package upload-image-to-oss receives a total of 1 weekly downloads. As such, upload-image-to-oss popularity was classified as not popular.
We found that upload-image-to-oss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.