Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

How to image upload in vform #10

Open
blpraveen opened this issue Jan 12, 2019 · 0 comments
Open

How to image upload in vform #10

blpraveen opened this issue Jan 12, 2019 · 0 comments

Comments

@blpraveen
Copy link

I need to upload an image in vform.

  <form @submit.prevent="editmode ? updatePost() : createPost()">
  <div class="modal-body">
 <div class="form-group">
    <input v-model="form.title" id="title" type="text" name="title"
        placeholder="Title"
        class="form-control" :class="{ 'is-invalid': form.errors.has('title') }">
    <has-error :form="form" field="title"></has-error>
   </div>


 <div class="form-group">
    <input v-model="form.featured" id="featured" type="file" name="featured"
        placeholder="Featured Image" @change="selectFile"
        class="form-control" :class="{ 'is-invalid': form.errors.has('featured') }">
    <has-error :form="form" field="featured"></has-error>
</div>
 </div>
   <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
<button v-show="editmode" type="submit" class="btn btn-success">Update</button>
<button v-show="!editmode" type="submit" class="btn btn-primary">Create</button>
    </div>
   </form>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant