Skip to content

Commit

Permalink
Restricting file input to .md files for Markdown to PDF conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshad Marathe authored and Harshad Marathe committed Nov 12, 2024
1 parent 0dd4456 commit 7e8ddde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/templates/convert/markdown-to-pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span class="tool-header-text" th:text="#{MarkdownToPDF.header}"></span>
</div>
<form method="post" enctype="multipart/form-data" th:action="@{'/api/v1/convert/markdown/pdf'}">
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multipleInputsForSingleRequest=false, accept='text/markdown')}"></div>
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multipleInputsForSingleRequest=false, accept='.md')}"></div>
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{MarkdownToPDF.submit}"></button>
</form>
<p class="mt-3" th:text="#{MarkdownToPDF.help}"></p>
Expand Down

0 comments on commit 7e8ddde

Please sign in to comment.