tmdr-vue-filemanager
v0.8.2
Published
Filemanager component for Timedoor Project.
Downloads
218
Readme
Timedoor Vue Filemanager
Filemanager component for Timedoor Project.
Project Setup
yarn add tmdr-vue-filemanager
Minimal Example
// YourComponent.vue
<script setup lang="ts">
import { ref } from 'vue';
import { FileManager } from 'tmdr-vue-filemanager'
import "tmdr-vue-filemanager/style.css"
const TOKEN = '{REQUEST TOKEN FROM BACKEND}'
const API_URL = '{BACKEND API URL}'
const PRIVATE_ID = '{RANDOM ID}' // optional, to create private storage
const selectedFile = ref(null)
const setFile = (file: any) => {
selectedFile.value = file
}
</script>
<template>
<div style="height: 500px;">
<FileManager :endpoint="API_URL" :token="TOKEN" :privateId="PRIVATE_ID" @select="setFile" />
</div>
<pre>{{ selectedFile }}</pre>
</template>