Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-picbed

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-picbed - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "github-picbed",
"version": "0.0.2",
"version": "0.0.3",
"description": "Upload file to github and Get Url",

@@ -5,0 +5,0 @@ "keywords": [

@@ -88,5 +88,6 @@ const request = require('./request');

filename = filename || fileHash + (extname || '');
let uploadname = filename.split('/').map(f => encodeURI(filename)).join('/')
let rsp = await request({
path: `/repos/${_options.username}/${_options.repository}/contents${_options.path}${filename}?ref=${_options.branch}`,
path: `/repos/${_options.username}/${_options.repository}/contents${_options.path}${uploadname}?ref=${_options.branch}`,
token: _options.token,

@@ -97,5 +98,4 @@ method: 'GET'

if (!rsp.content) {
console.dir(_options);
let rsp = await request({
path: `/repos/${_options.username}/${_options.repository}/contents${_options.path}${filename}`,
path: `/repos/${_options.username}/${_options.repository}/contents${_options.path}${uploadname}`,
token: _options.token,

@@ -102,0 +102,0 @@ method: 'PUT',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc