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.
- checksums.yaml +4 -4
- data/assets/js/googledrive.js +9 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5457587676fe8689ec11c33204dbe27879b6f301f1bb216d1d0fb4540d0c5b88
|
4
|
+
data.tar.gz: b1af1e8bda3cfddb1757f6749b611cade6e567fc8a538c8a7f30db535e006c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41aea15f2a2c7e935f79ef178889c04afd38555c3d88e0c3c35b24f32982db9a80983d4264dff3abd3394910725c2e2d4760399184b2330c27de2136dcca73fe
|
7
|
+
data.tar.gz: d069a3c39fa8f2500a58d91da3068235378df6c577b65405b8a440f329332180b8233bf3094413d4c45a063d7a301824b955e975f0a36f6720e504096fe5f0d7
|
data/assets/js/googledrive.js
CHANGED
@@ -68,18 +68,20 @@ const pickerCallback = async (data) => {
|
|
68
68
|
}
|
69
69
|
function chooseFromDropbox() {
|
70
70
|
Dropbox.choose({
|
71
|
-
success:
|
71
|
+
success: async (files) => {
|
72
72
|
if (files.length < 0) {
|
73
73
|
return
|
74
74
|
}
|
75
75
|
var file = files[0]
|
76
|
-
|
77
|
-
|
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
|
}
|