<template>
  <div>
    <file-upload fname="file" :url="imageUploadUrl" :completed-callback="uploadCb"></file-upload>
    {{filePath}}
  </div>
</template>

<script>
  import commonUtil from '../../core/tool/commonUtil';
  import FileUpload from "../../core/comps/upload/upload.vue";

  export default {
    name: 'ImgUpload',
    components: {FileUpload},
    data () {
      return {
        imageUploadUrl:"/api/upload/awsFileUpload",
        filePath:""  
      } 
    },
    
    methods:{
      uploadCb(d){
        if(d.success){
            this.filePath = d.data.data.url;
        }
      }
    },
    mounted(){
        
    }

  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
