Allow input type file for NcActionInput
Opened this issue · 3 comments
feefladder commented
I want to make an app that does some preprocessing on files before uploading to Nextcloud. For this, I need a file input. However, the NcActionInput does not support type=file
:
<NcActionInput
type="file"
accept=".csv"
@submit="$emit('upload-file', $event)">
<template #icon>
<UpIcon />
</template>
</NcActionInput>
<script>
import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput.js'
import UpIcon from 'vue-material-design-icons/ArrowUpThin.vue'
</script>
I would be happy to PR if people think it is a good idea
szaimen commented
cc @nextcloud/vuejs
skjnldsv commented
Not too convinced tbh. Feels like a specific use case, not sure we'll use it anywhere else
But you can easily go around that with a input for binding and another input type file somewhere in your template.
feefladder commented
That's what I did in the end. Also I didn't exactly realize that v-model
doesn't work on file, while it does work on the rest, so that may be a reason why not to use it.