Skip to content

TS2345: Argument of type 'IFile' is not assignable to parameter of type 'string | Blob'. #144

Open
@joegasewicz

Description

@joegasewicz

Error:

TS2345: Argument of type 'IFile' is not assignable to parameter of type 'string | Blob'.

Recreate error:

const teacher_img = getFileFromRef(teacherImgRef);
formData.append("teacher_img", teacher_img); // Error thrown here -> TS2345: Argument of type 'IFile' is not assignable to parameter of type 'string | Blob'.

Quick fix:

formData.append("teacher_img", teacher_img as any);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions