Last active
April 10, 2019 12:25
-
-
Save Karthik-B-06/49537a4a0cfbb03a2a409aca375997ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dropboxIconClicked() { | |
| let options = { | |
| success: async files => { | |
| let attachments = []; | |
| for (let i = 0; i < files.length; i++) { | |
| let attachment = {}; | |
| attachment._id = files[i].id; | |
| attachment.title = files[i].name; | |
| attachment.size = files[i].bytes; | |
| attachment.iconURL = files[i].icon; | |
| attachment.link = files[i].link; | |
| attachment.extension = `. ${files[i].name.split(".")[1]}`; | |
| attachments.push(attachment); | |
| } | |
| this.tempAttachments = attachments; | |
| console.log(this.tempAttachments); | |
| }, | |
| cancel: function() {}, | |
| linkType: "preview", | |
| multiselect: true, | |
| extensions: [ | |
| ".pdf", | |
| ".doc", | |
| ".docx", | |
| ], | |
| folderselect: false, | |
| sizeLimit: 102400000 | |
| }; | |
| Dropbox.choose(options); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment