Socket
Socket
Sign inDemoInstall

strapi-provider-upload-double-azure

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-provider-upload-double-azure - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

25

lib/index.js

@@ -29,10 +29,18 @@ const {

},
containerName: {
label: 'Container name',
containerNamePublic: {
label: 'Container name of the public content',
type: 'text',
},
defaultPath: {
label: 'The path to use when there is none being specified',
containerNamePrivate: {
label: 'Container name of the private content',
type: 'text',
},
defaultPathPublic: {
label: 'The path to use inside the public container',
type: 'text',
},
defaultPathPrivate: {
label: 'The path to use inside the private container',
type: 'text',
},
maxConcurent: {

@@ -51,7 +59,7 @@ label: 'The maximum concurrent uploads to Azure',

const serviceURL = new ServiceURL(serviceBaseURL, pipeline);
const containerURL = ContainerURL.fromServiceURL(serviceURL, config.containerName);
const containerURLPublic = ContainerURL.fromServiceURL(serviceURL, config.containerNamePublic);
const containerURLPrivate = ContainerURL.fromServiceURL(serviceURL, config.containerNamePrivate);
return {
upload: async file => {
console.log({ file, defaultPath: config.defaultPath })
const private = file.private

@@ -61,4 +69,5 @@ const azureRes = new Promise((resolve, reject) => {

const folder = private ? "usersprivate" : "games"
const containerWithPath = Object.assign({}, containerURL);
containerWithPath.url += file.path ? `/${file.path}/${folder}` : `/${config.defaultPath}/${folder}`;
const containerWithPath = Object.assign({}, private ? containerURLPrivate : containerURLPublic);
const defaultPath = private ? config.defaultPathPrivate : config.defaultPathPublic
containerWithPath.url += file.path ? `/${file.path}/${folder}` : `/${defaultPath}/${folder}`;

@@ -65,0 +74,0 @@ const blobURL = BlobURL.fromContainerURL(containerWithPath, fileName);

{
"name": "strapi-provider-upload-double-azure",
"version": "1.0.0",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "./lib",

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