Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Google Drive API wrapper for Vue 2.
$ yarn add uuki/vue-gapi
$ yarn add uuki/vue-gdrive
Use VueGAPI for GAPI authentication.
import Vue from 'vue'
import VueGAPI from 'vue-gapi'
import VueGDrive from 'vue-gdrive'
/**
* https://github.com/cedpoilly/vue-gapi
*/
Vue.use(VueGAPI, {
apiKey: '<API_KEY>',
clientId: '<CLIENT_ID>',
discoveryDocs: ['<DISCOVERY_DOCS>'],
scope: '<SCOPE>',
})
Vue.use(VueGDrive)
gapi.client.drive.files.create
)gapi.client.drive.files.delete
)gapi.client.drive.files.list
)<script>
export default {
methods: {
async createFile () {
const result = await this.$gdrive.createFile({
name: '<FILE_NAME>',
parents: ['<FOLDER_ID>'],
uploadType: 'media',
fields: 'id, name, parents',
media: {
mimeType: '<MIME_TYPE>'
},
resource: {
mimeType: 'application/vnd.google-apps.<FILE_TYPE>'
}
})
},
async getListFiles () {
const result = await this.$gdrive.getListFiles({
orderBy: 'folder,modifiedTime',
q: "trashed=false and '<DRIVE_ID>' in parents",
fields: 'files(id, name, kind, size, mimeType, lastModifyingUser, modifiedTime, iconLink, owners, folderColorRgb, shared, webViewLink, webContentLink), nextPageToken',
});
},
async deleteFile () {
const result = await this.$gdrive.deleteFile({
fileId: '<FILE_ID>'
})
},
}
}
</script>
※ require scope -> https://www.googleapis.com/auth/drive
Supports multiple
attribute.
<template>
<div>
<!-- input pattern -->
<input type="file" multiple v-gd-upload-area="uploadArea">
<!-- droppable pattern -->
<div v-gd-upload-area="uploadArea" />
</div>
</template>
<script>
export default {
data () {
uploadArea: {
uploadOptions: {
path: '/upload/drive/v3/files',
},
metaExtends: {
parents:['<TARGET_FOLDER_ID>']
},
callback: this.onUploaded
}
},
onUploaded (objFile) {
console.log(objFile);
}
}
</script>
FAQs
Google Drive API wrapper for Vue 2.
We found that vue-gdrive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.