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.
Files changed (2) hide show
  1. package/appit.js +7 -1
  2. 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.file) {
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtb-appit",
3
- "version": "0.0.87",
3
+ "version": "0.0.88",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},