Created
July 19, 2019 15:17
-
-
Save scottweinert/73a87dcb3f6ba63950bf0adcf52edcb8 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
<template> | |
<div> | |
<VueDropzone | |
id="dropzone" | |
v-on:vdropzone-sending="sendingEvent" | |
:awss3="awss3" | |
v-on:vdropzone-s3-upload-error="s3UploadError" | |
v-on:vdropzone-s3-upload-success="s3UploadSuccess" | |
:options="dropzoneOptions" | |
/> | |
</div> | |
</template> | |
<script> | |
import vue2Dropzone from 'vue2-dropzone' | |
import 'vue2-dropzone/dist/vue2Dropzone.min.css' | |
export default { | |
name: 'MyVue', | |
components: { | |
VueDropzone: vue2Dropzone | |
}, | |
data() { | |
return { | |
dropzoneOptions: { | |
url: 'https://httpbin.org/post', | |
thumbnailWidth: 200, | |
addRemoveLinks: true | |
}, | |
awss3: { | |
signingURL: 'http://localhost:3001/backoffice/connector/upload', | |
headers: {}, | |
params: {} | |
} | |
} | |
}, | |
methods: { | |
sendingEvent(event) { | |
console.log(sending, event) | |
}, | |
s3UploadError(errorMessage) { | |
console.log(errorMessage) | |
}, | |
s3UploadSuccess(s3ObjectLocation) { | |
console.log(s3ObjectLocation) | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment