appscms-tools-theme 0.8.9 → 0.9.0
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 +20 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca15a7c361170971239f1c88fad5544b70c52e58ef11445cd31f7ad0c52bbcc3
|
4
|
+
data.tar.gz: 42bfb2d4b4d0072ed83653acdc974f80b6f962e169879cb3088dc0436d4d5bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b93720825ec1e547f3da872cfe38fc681a2263edde7142986c41448358564a839a7e7aabed45abb3fd008c975bc22c773f68fff68f3f28c712dce8f08cdbd851
|
7
|
+
data.tar.gz: d65782fc14252367d1d8771c5d58192b63a42d7f313d0a5904227742c0b3b7d97cc145553b3d483632f10aed56757232e910e5d22581c478360fb0d80c08d4ca
|
data/assets/js/googledrive.js
CHANGED
@@ -52,19 +52,34 @@ const createPicker = () => {
|
|
52
52
|
const pickerCallback = async (data) => {
|
53
53
|
if (data.action == google.picker.Action.PICKED) {
|
54
54
|
const res = await fetch(
|
55
|
-
`https://www.googleapis.com/drive/
|
55
|
+
`https://www.googleapis.com/drive/v3/files/${data.docs[0].id}?alt=media`,
|
56
56
|
{
|
57
57
|
headers: {
|
58
58
|
Authorization: `Bearer ${oauthToken}`,
|
59
|
-
Accept: 'application/json',
|
60
59
|
},
|
61
60
|
}
|
62
|
-
).then((res) => res.
|
63
|
-
const response = await fetch(res.webContentLink).then((res) => res.blob())
|
61
|
+
).then((res) => res.blob())
|
64
62
|
let metadata = {
|
65
63
|
type: data.docs[0].mimeType,
|
66
64
|
}
|
67
|
-
let file = new File([
|
65
|
+
let file = new File([res], data.docs[0].name, metadata)
|
68
66
|
getFile(file)
|
69
67
|
}
|
70
68
|
}
|
69
|
+
function chooseFromDropbox() {
|
70
|
+
Dropbox.choose({
|
71
|
+
success: function (files) {
|
72
|
+
if (files.length < 0) {
|
73
|
+
return
|
74
|
+
}
|
75
|
+
var file = files[0]
|
76
|
+
alert('Download Link : ' + file.link + '\nFile Name : ' + file.name)
|
77
|
+
console.log(file.link)
|
78
|
+
},
|
79
|
+
cancel: function () {},
|
80
|
+
linkType: 'direct',
|
81
|
+
multiselect: false,
|
82
|
+
extensions: ['.jpg'],
|
83
|
+
folderselect: false,
|
84
|
+
})
|
85
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appscms-tools-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|