fix replace button file types

pull/250/head
Pete Matsyburka 2 years ago
parent 2cb15f3282
commit b791d0699c

@ -175,6 +175,7 @@
:with-arrows="template.schema.length > 1" :with-arrows="template.schema.length > 1"
:item="template.schema.find((item) => item.attachment_uuid === document.uuid)" :item="template.schema.find((item) => item.attachment_uuid === document.uuid)"
:with-replace-button="withUploadButton" :with-replace-button="withUploadButton"
:accept-file-types="acceptFileTypes"
:document="document" :document="document"
:template="template" :template="template"
class="pb-2 mb-2 border-b border-base-300 border-dashed" class="pb-2 mb-2 border-b border-base-300 border-dashed"

@ -9,6 +9,7 @@
<ReplaceButton <ReplaceButton
v-if="withReplaceButton" v-if="withReplaceButton"
:template-id="template.id" :template-id="template.id"
:accept-file-types="acceptFileTypes"
@click.stop @click.stop
@success="$emit('replace', { replaceSchemaItem: item, ...$event })" @success="$emit('replace', { replaceSchemaItem: item, ...$event })"
/> />
@ -62,6 +63,11 @@ export default {
type: Object, type: Object,
required: true required: true
}, },
acceptFileTypes: {
type: String,
required: false,
default: 'image/*, application/pdf'
},
withReplaceButton: { withReplaceButton: {
type: Boolean, type: Boolean,
required: true, required: true,

Loading…
Cancel
Save