@enplug/scripts 1.11.4-dev34 → 1.11.4-dev35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -113,12 +113,12 @@ function generateFormData(crowdinPath, localPath) {
|
|
|
113
113
|
|
|
114
114
|
console.log('localPath', localPath);
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
let filePath = path.join(__dirname, localPath);
|
|
117
|
+
let fileData = fs.readFileSync(filePath);
|
|
118
118
|
console.log('fileData', fileData);
|
|
119
119
|
console.log(fileData.slice(0, 100));
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
let formData = new FormData();
|
|
121
|
+
let file = fs.readFileSync(localPath);
|
|
122
122
|
console.log('file', file);
|
|
123
123
|
console.log(file.slice(0, 100));
|
|
124
124
|
// formData.append('file', file, 'en.json');
|
|
@@ -131,7 +131,7 @@ function generateFormData(crowdinPath, localPath) {
|
|
|
131
131
|
const formData = generateFormData(crowdinPath, localPath);
|
|
132
132
|
|
|
133
133
|
const url = `${CROWDIN_STORAGE_URL}`;
|
|
134
|
-
console.log('formData', formData);
|
|
134
|
+
// console.log('formData', formData);
|
|
135
135
|
return axios.post(url, formData, { headers: {
|
|
136
136
|
"Authorization": AuthStr,
|
|
137
137
|
"Content-Type": 'application/json',
|