Closed MaratheHarshad closed 1 day ago
Hey there, @MaratheHarshad! I'm here to help you with any bugs, questions, or contributions. Let me know how I can assist you!
To address the issue of the "Markdown to PDF" feature accepting non-Markdown files, you can modify the HTML file input element to restrict it to only accept .md
files. This can be done by setting the accept
attribute to .md
in the file input element. Here's how you can implement this change:
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multipleInputsForSingleRequest=false, accept='.md')}"></div>
This modification will ensure that the file input only allows files with the .md
extension to be selected, preventing errors with non-Markdown files [1].
To continue talking to Dosu, mention @dosu.
Installation Method
None
The Problem
Description:
Currently, the file input for the "Markdown to PDF" feature accepts all types of files, including non-Markdown files. To prevent errors and ensure the correct files are processed, the input should be restricted to only accept .md (Markdown) files.
Feature URL: https://stirlingpdf.io/markdown-to-pdf
Steps to Reproduce:
Screenshots:
Expected Behavior: The file input should only accept .md files for conversion, and any other file types should be rejected.
Suggested Solution: Modify the file input HTML to use accept=".md".
Version of Stirling-PDF
0.32.0
Last Working Version of Stirling-PDF
No response
Page Where the Problem Occurred
https://stirlingpdf.io/markdown-to-pdf
Docker Configuration
No response
Relevant Log Output
No response
Additional Information
No response
Browsers Affected
No response
No Duplicate of the Issue