vtb-appit 0.0.87 → 0.0.88
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.
- package/appit.js +7 -1
- package/package.json +1 -1
package/appit.js
CHANGED
|
@@ -968,7 +968,13 @@ class Appit {
|
|
|
968
968
|
if(data.content)
|
|
969
969
|
formData.append('content', data.content);
|
|
970
970
|
|
|
971
|
-
if(data.
|
|
971
|
+
if(data.files) {
|
|
972
|
+
data.files.forEach(file => {
|
|
973
|
+
formData.append('files[id][]', '');
|
|
974
|
+
formData.append('files[title][]', data.title);
|
|
975
|
+
formData.append('files[file][]', fs.createReadStream(file));
|
|
976
|
+
})
|
|
977
|
+
} else if(data.file) {
|
|
972
978
|
formData.append('files[id][]', '');
|
|
973
979
|
formData.append('files[title][]', data.title);
|
|
974
980
|
formData.append('files[file][]', fs.createReadStream(data.file));
|