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

backblaze-b2

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backblaze-b2 - npm Package Compare versions

Comparing version 0.9.7 to 0.9.8

9

CHANGELOG.md

@@ -0,1 +1,10 @@

### v0.9.8 (January 5, 2016) - The good response release
Features
- Updated all file functions to properly encode a fileName with a path [link](https://github.com/yakovkhalinsky/backblaze-b2/pull/10)
Thanks for reporting issues for this release
- [mmccallum](https://github.com/mmccallum)
### v0.9.7 (January 5, 2016) - The good response release

@@ -2,0 +11,0 @@

8

lib/actions/file.js

@@ -12,3 +12,3 @@ var sha1 = require('node-sha1');

var uploadAuthToken = args.uploadAuthToken;
var filename = encodeURIComponent(args.filename);
var filename = utils.getUrlEncodedFileName(args.filename);
var data = args.data;

@@ -70,3 +70,3 @@ var info = args.info;

var bucketId = args.bucketId;
var fileName = encodeURIComponent(args.fileName);
var fileName = utils.getUrlEncodedFileName(args.fileName);

@@ -99,3 +99,3 @@ var options = {

var bucketName = args.bucketName;
var fileName = encodeURIComponent(args.fileName);
var fileName = utils.getUrlEncodedFileName(args.fileName);

@@ -134,3 +134,3 @@ var options = {

var fileId = args.fileId;
var fileName = encodeURIComponent(args.fileName);
var fileName = utils.getUrlEncodedFileName(args.fileName);

@@ -137,0 +137,0 @@ var options = {

@@ -71,1 +71,7 @@

};
exports.getUrlEncodedFileName = function(fileName) {
return fileName.split('/')
.map(encodeURIComponent)
.join('/');
};
{
"name": "backblaze-b2",
"version": "0.9.7",
"version": "0.9.8",
"description": "Node.js Library for the Backblaze B2 Storage Service",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -94,3 +94,3 @@ ### Backblaze B2 Node.js Library

bucketId: 'bucketId',
fileName: 'fileName',
fileName: 'fileName'
}); // returns promise

@@ -97,0 +97,0 @@

@@ -217,2 +217,12 @@ var expect = require('expect.js');

describe('getUrlEncodedFileName', function() {
it('Should correctly encode a fileName with no paths', function() {
expect(utils.getUrlEncodedFileName('unicorns and rainbows !@#$%^&')).to.equal('unicorns%20and%20rainbows%20!%40%23%24%25%5E%26');
});
it('Should correctly encode a fileName with paths', function() {
expect(utils.getUrlEncodedFileName('foo/bar/unicorns and rainbows !@#$%^&')).to.equal('foo/bar/unicorns%20and%20rainbows%20!%40%23%24%25%5E%26');
});
});
});

Sorry, the diff of this file is not supported yet

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