Skip to content

Error: files[0].mimeType: expected string, got undefined. Even though I'm supplying the mime type string. #24

Open
@randall-coding

Description

@randall-coding

I'm having this error while attempting to upload a file using set_input_files_builder(). I'm supplying a file and mime type but I'm receiving an error that files[0].mimeType is undefined, how could this be?

Here is the code in question:

let file:File = File::new("Test".to_string(), "video/mp4".to_string(), &std::fs::read("/home/super/Downloads/test.mp4").unwrap());
video_input.set_input_files_builder(file).set_input_files().await.unwrap();

I'm new to playwright and even when I use Selenium I haven't been uploading files. So I may be just being a newb here. Any help is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions