@lingk/sync 1.1.44 → 1.1.45

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.
@@ -4579,7 +4579,7 @@ module.exports =
4579
4579
  f = Math.floor(Math.log(a) / Math.log(c));return parseFloat((a / Math.pow(c, f)).toFixed(d)) + " " + e[f];
4580
4580
  }
4581
4581
 
4582
- var extensionBlacklist = ['xml', 'zip', 'tar', 'gz'];
4582
+ var extensionBlacklist = ['zip', 'tar', 'gz'];
4583
4583
 
4584
4584
  var FlatFile = function (_Component) {
4585
4585
  _inherits(FlatFile, _Component);
@@ -4721,6 +4721,18 @@ module.exports =
4721
4721
  _this.props.onDrop();
4722
4722
  }
4723
4723
  }
4724
+ } else if (extension === 'txt' || extension === 'xml') {
4725
+ var csvMeta = {
4726
+ name: file.name,
4727
+ type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
4728
+ byteSize: file.size
4729
+ };
4730
+ meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4731
+ counter += 1;
4732
+ if (counter === fs.length) {
4733
+ _this.setState({ meta: meta });
4734
+ _this.props.onDrop();
4735
+ }
4724
4736
  }
4725
4737
 
4726
4738
  // ADD TO CONTENTS, TO UPLOAD
@@ -5329,7 +5341,11 @@ module.exports =
5329
5341
  creds = _props.creds,
5330
5342
  config = _props.config;
5331
5343
 
5332
- if (config.type === 'LingkWebSocket') {
5344
+ if (config.type === 'SFTP') {
5345
+ this.setState({ actualCreds: Object.assign({}, creds, {
5346
+ filePattern: '*.*'
5347
+ }) });
5348
+ } else if (config.type === 'LingkWebSocket') {
5333
5349
  this.setState({ actualCreds: Object.assign({}, creds, {
5334
5350
  rootUrl: creds.rootUrl || 'wss://'
5335
5351
  }) });