๐
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
| npm install -g vue/cli |
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
| dropzoneOptions: { | |
| url: `the server url, where you want your filesto be sent`, | |
| maxFilesize: <max file size in MB>, | |
| headers: { | |
| Authorization: `<your application access-token>` | |
| }, | |
| paramName: function(n) { | |
| return "file[]"; | |
| }, | |
| dictDefaultMessage: "Upload Files Here xD", |
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
| <vue-dropzone | |
| ref="myVueDropzone" | |
| :useCustomSlot="true" | |
| id="dropzone" | |
| @vdropzone-upload-progress="uploadProgress" | |
| :options="dropzoneOptions" | |
| @vdropzone-file-added="fileAdded" | |
| @vdropzone-sending-multiple="sendingFiles" | |
| @vdropzone-success-multiple="success" | |
| ></vue-dropzone> |
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
| components: { | |
| vueDropzone: vue2Dropzone | |
| } |
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
| import vue2Dropzone from 'vue2-dropzone'; | |
| import 'vue2-dropzone/dist/vue2Dropzone.min.css'; |
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
| npm install vue2-dropzone |
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
| vue create <project-name> |
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
| yarn global add @vue/cli |
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
| mounted() { | |
| let gDrive = document.createElement("script"); | |
| gDrive.setAttribute("type", "text/javascript"); | |
| gDrive.setAttribute("src", "https://apis.google.com/js/api.js"); | |
| document.head.appendChild(gDrive); | |
| } |
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
| data() { | |
| return { | |
| pickerApiLoaded: false, | |
| developerKey: " <-- YOUR API KEY --> ", | |
| clientId: "<-- YOUR OAUTH CLIENT ID --> ", | |
| scope: "https://www.googleapis.com/auth/drive.readonly", | |
| oauthToken: null | |
| } | |
| } |
OlderNewer