appscms-tools-theme 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/assets/js/googledrive.js +9 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca15a7c361170971239f1c88fad5544b70c52e58ef11445cd31f7ad0c52bbcc3
4
- data.tar.gz: 42bfb2d4b4d0072ed83653acdc974f80b6f962e169879cb3088dc0436d4d5bee
3
+ metadata.gz: 5457587676fe8689ec11c33204dbe27879b6f301f1bb216d1d0fb4540d0c5b88
4
+ data.tar.gz: b1af1e8bda3cfddb1757f6749b611cade6e567fc8a538c8a7f30db535e006c30
5
5
  SHA512:
6
- metadata.gz: b93720825ec1e547f3da872cfe38fc681a2263edde7142986c41448358564a839a7e7aabed45abb3fd008c975bc22c773f68fff68f3f28c712dce8f08cdbd851
7
- data.tar.gz: d65782fc14252367d1d8771c5d58192b63a42d7f313d0a5904227742c0b3b7d97cc145553b3d483632f10aed56757232e910e5d22581c478360fb0d80c08d4ca
6
+ metadata.gz: 41aea15f2a2c7e935f79ef178889c04afd38555c3d88e0c3c35b24f32982db9a80983d4264dff3abd3394910725c2e2d4760399184b2330c27de2136dcca73fe
7
+ data.tar.gz: d069a3c39fa8f2500a58d91da3068235378df6c577b65405b8a440f329332180b8233bf3094413d4c45a063d7a301824b955e975f0a36f6720e504096fe5f0d7
@@ -68,18 +68,20 @@ const pickerCallback = async (data) => {
68
68
  }
69
69
  function chooseFromDropbox() {
70
70
  Dropbox.choose({
71
- success: function (files) {
71
+ success: async (files) => {
72
72
  if (files.length < 0) {
73
73
  return
74
74
  }
75
75
  var file = files[0]
76
- alert('Download Link : ' + file.link + '\nFile Name : ' + file.name)
77
- console.log(file.link)
76
+ const url = new URL(file.link)
77
+ const response = await fetch(url).then((res) => res.blob())
78
+ let newFile = new File([response], file.name)
79
+ getDropBoxFile(newFile)
78
80
  },
79
81
  cancel: function () {},
80
- linkType: 'direct',
81
- multiselect: false,
82
- extensions: ['.jpg'],
83
- folderselect: false,
82
+ linkType: 'direct', //Direct = Download link
83
+ multiselect: false, //Allow to select one file
84
+ extensions: ['.jpg'], //Allow to choose PDF file only
85
+ folderselect: false, //Not allow to select folder
84
86
  })
85
87
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms