Skip to content

Instantly share code, notes, and snippets.

@martinyung
Created September 9, 2017 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinyung/c4b70662fda4e972c0708c0b99c54754 to your computer and use it in GitHub Desktop.
Save martinyung/c4b70662fda4e972c0708c0b99c54754 to your computer and use it in GitHub Desktop.
[blogging purpose] file upload vuejs component - template
<!-- HTML Template -->
<template>
<div>
<div class="input-group">
<input type="text" class="form-control" placeholder="Select file..." :value="file.name" readonly>
<span class="input-group-btn">
<button class="btn btn-default" type="button" @click="selectFile">Select file</button>
<button class="btn btn-default" type="button" @click="uploadFile">Upload</button>
</span>
</div>
<input type="file" style="display:none" ref="file" v-uploader/>
</div>
</template>
<!-- Javascript -->
<script>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment