1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-15 18:54:36 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
snyk-bot
28e0e3a147 fix: upgrade axios from 0.26.0 to 0.26.1
Snyk has created this PR to upgrade axios from 0.26.0 to 0.26.1.

See this package in npm:
https://www.npmjs.com/package/axios

See this project in Snyk:
https://app.snyk.io/org/allanbowe/project/2cf085e5-c256-4a84-bf6a-227076754853?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-03-30 20:49:57 +00:00
Allan Bowe
ee97e8211e Merge pull request #685 from sasjs/issue-684
fix: blob is not defined
2022-03-28 14:26:58 +03:00
d0eb1a7bfb fix: should not create blob in node 2022-03-24 02:43:14 +05:00
3 changed files with 19 additions and 12 deletions

14
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"license": "ISC",
"dependencies": {
"@sasjs/utils": "2.40.0",
"axios": "0.26.0",
"axios": "^0.26.1",
"axios-cookiejar-support": "1.0.1",
"form-data": "4.0.0",
"https": "1.0.0",
@@ -2189,9 +2189,9 @@
}
},
"node_modules/axios": {
"version": "0.26.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz",
"integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==",
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"dependencies": {
"follow-redirects": "^1.14.8"
}
@@ -14787,9 +14787,9 @@
"dev": true
},
"axios": {
"version": "0.26.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz",
"integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==",
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
}

View File

@@ -73,7 +73,7 @@
"main": "index.js",
"dependencies": {
"@sasjs/utils": "2.40.0",
"axios": "0.26.0",
"axios": "0.26.1",
"axios-cookiejar-support": "1.0.1",
"form-data": "4.0.0",
"https": "1.0.0",

View File

@@ -26,11 +26,18 @@ export const generateFileUploadForm = (
)
}
const file = new Blob([csv], {
type: 'application/csv'
})
if (typeof FormData === 'undefined' && formData instanceof NodeFormData) {
formData.append(name, csv, {
filename: `${name}.csv`,
contentType: 'application/csv'
})
} else {
const file = new Blob([csv], {
type: 'application/csv'
})
formData.append(name, file, `${name}.csv`)
formData.append(name, file, `${name}.csv`)
}
}
return formData