Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web-sys: Add Blob.stream() method #2140

Merged
merged 1 commit into from
May 18, 2020
Merged

Commits on May 16, 2020

  1. Add Blob.stream() method

    This enables a ReadableStream to be obtained for a file, which can then
    be handled with e.g. https://github.com/MattiasBuelens/wasm-streams
    
        let file: web_sys::File = ...;
        let stream = wasm_streams::readable::ReadableStream::from(
            file.stream()
                .unchecked_into::<wasm_streams::readable::sys::ReadableStream>(),
        );
    
    WebIDL source: https://w3c.github.io/FileAPI/#blob-section
    Docs: https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream
    str4d committed May 16, 2020
    Configuration menu
    Copy the full SHA
    9943422 View commit details
    Browse the repository at this point in the history