Skip to content

How I can send files with minreq? :( #83

@0xS4D

Description

@0xS4D
let mut file = fs::File::open(&dir_temp.join(constants::TEMP_NAME)).unwrap();
    let mut buffer = Vec::new();
    file.read_to_end(&mut buffer).unwrap();
    
    let response = minreq::post(constants::URL)
        .with_header("Content-Type", "multipart/form-data")
        .with_header("Content-Length", &buffer.len().to_string())
        .with_body(buffer)
        .send()
        .unwrap();

I tried this but don't work :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions