directus-sdk-javascript
Advanced tools
Comparing version 2.12.3 to 2.13.3
{ | ||
"name": "directus-sdk-javascript", | ||
"version": "2.12.3", | ||
"version": "2.13.3", | ||
"description": "WIP - Directus SDK for JavaScript (Node and Browser)", | ||
@@ -29,3 +29,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"axios": "^0.16.2", | ||
"axios": "^0.18.0", | ||
"qs": "^6.5.2" | ||
@@ -32,0 +32,0 @@ }, |
@@ -6,3 +6,3 @@ const axios = require('axios'); | ||
constructor(options) { | ||
const {accessToken, url, headers, accessTokenType, version} = options; | ||
const {accessToken, url, headers, accessTokenType, version, maxFileSize} = options; | ||
@@ -13,2 +13,3 @@ this.accessTokenType = accessTokenType || 'header'; | ||
this.version = version || '1.1'; | ||
this.maxFileSize = maxFileSize; | ||
@@ -69,3 +70,3 @@ if (!url) { | ||
return new Promise((resolve, reject) => { | ||
axios.post(url + endpoint, data, {headers, params}) | ||
axios.post(url + endpoint, data, {headers, params, maxContentLength: this.maxFileSize}) | ||
.then(res => resolve(res.data)) | ||
@@ -83,3 +84,3 @@ .catch(err => this._onCaughtError(resolve, reject, err)); | ||
return new Promise((resolve, reject) => { | ||
axios.put(url + endpoint, data, {headers, params}) | ||
axios.put(url + endpoint, data, {headers, params, maxContentLength: this.maxFileSize}) | ||
.then(res => resolve(res.data)) | ||
@@ -86,0 +87,0 @@ .catch(err => this._onCaughtError(resolve, reject, err)); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85680
343
+ Addedaxios@0.18.1(transitive)
+ Addedfollow-redirects@1.5.10(transitive)
+ Addedis-buffer@2.0.5(transitive)
- Removedaxios@0.16.2(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedis-buffer@1.1.6(transitive)
Updatedaxios@^0.18.0