2

Trying to validate a file upload to make sure it is a .md / markdown file.

I have this:

 'mdfile' => 'mimes:text/markdown'

But also tried many variations:

'mdfile' => 'mimes:markdown'
'mdfile' => 'mimes:md'

But it always fails even if I am uploading a markdown file.

Cannot find much information online about validating against markdown files, any help?

1 Answer 1

1

There's no official mime type for markdown.

Try text/x-markdown. Or anything that "prefixes" with text/*.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.