Skip to content

Commit

Permalink
fix: add missing property fileName to FileJSON type
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 4, 2023
1 parent b420372 commit da1db06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/multipart/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Macroable from '@poppinss/macroable'
import { moveFile } from '../helpers.js'
import { SizeValidator } from './validators/size.js'
import { ExtensionValidator } from './validators/extensions.js'
import type { FileUploadError, FileValidationOptions } from '../types.js'
import type { FileJSON, FileUploadError, FileValidationOptions } from '../types.js'

/**
* The file holds the meta/data for an uploaded file, along with
Expand Down Expand Up @@ -200,7 +200,7 @@ export class MultipartFile extends Macroable {
/**
* Returns file JSON representation
*/
toJSON() {
toJSON(): FileJSON {
return {
fieldName: this.fieldName,
clientName: this.clientName,
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export type FileJSON = {
clientName: string
size: number
filePath?: string
fileName?: string
type?: string
extname?: string
subtype?: string
Expand Down

0 comments on commit da1db06

Please sign in to comment.