Skip to content

Commit

Permalink
style: add docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 27, 2019
1 parent a91f757 commit 59c8daf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import * as fileType from 'file-type'
import * as mediaTyper from 'media-typer'
import { FileUploadError } from '@ioc:Adonis/Addons/BodyParser'

/**
* Attempts to parse the file mime type using the file magic number
*/
function parseMimeType (mime): { type: string, subtype: string } | null {
try {
const { type, subtype } = mediaTyper.parse(mime)
Expand Down

0 comments on commit 59c8daf

Please sign in to comment.