首页 > 解决方案 > Vue / Vuetify / Laravel - 存储多个文件输入

问题描述

我需要将多个文件存储到用户上传的本地存储中。我不知道如何存储它并将其与id用户绑定。我正在从我那里获取数组文件,data但我只到了这一点。很抱歉,我需要这方面的帮助。

<v-file-input
  v-model="tableItem.files"
  small-chips 
  multiple 
  placeholder="Select file..."
  dense
/>

<script>
export default {
  data() {
    return {
      tableItem {
        files: [],
      }
    }
  },

  methods: {
  async save() {
    try {
      let res = await axios.post('/api/positions', this.tableItem)
    } catch(error) {
      console.log(error)
    }
  }
}
</script>

标签: laravelvue.jsvuetify.js

解决方案


推荐阅读