Force file input to accept file type based on project type (#552)

This commit is contained in:
Emma Cypress
2022-06-26 05:08:50 +00:00
committed by GitHub
parent 168ec9092a
commit e4584e3f04
2 changed files with 14 additions and 2 deletions

View File

@@ -548,7 +548,13 @@
}"
class="file-input"
multiple
accept=".jar,application/java-archive,.zip,application/zip,.mrpack"
:accept="
projectType.toLowerCase() === 'modpack'
? '.mrpack,application/x-modrinth-modpack+zip'
: projectType.toLowerCase() === 'mod'
? '.jar,application/java-archive'
: '*'
"
prompt="Choose files or drag them here"
:max-size="524288000"
@change="