Git Product home page Git Product logo

multipart-sync's Introduction

Multipart Build Status On Crates.io

Client- and server-side abstractions for HTTP file uploads (POST requests with Content-Type: multipart/form-data).

Supports several different (synchronous API) HTTP crates. Asynchronous (i.e. futures-based) API support will be provided by multipart-async.

Minimum supported Rust version: 1.36.0
Maintenance Status: Passive

As the web ecosystem in Rust moves towards asynchronous APIs, the need for this crate in synchronous API form becomes dubious. This crate in its current form is usable enough, so as of June 2020 it is now in passive maintenance mode; bug reports will be addressed as time permits and PRs will be accepted but otherwise no new development of the existing API is taking place.

Look for a release of multipart-async soon which targets newer releases of Hyper.

Integrations

Example files demonstrating how to use multipart with these crates are available under examples/.

via the hyper feature (enabled by default).

Note: Hyper 0.9, 0.10 (synchronous API) only; support for asynchronous APIs will be provided by multipart-async.

Client integration includes support for regular hyper::client::Request objects via multipart::client::Multipart, as well as integration with the new hyper::Client API via multipart::client::lazy::Multipart (new in 0.5).

Server integration for hyper::server::Request via multipart::server::Multipart.

via the iron feature.

Provides regular server-side integration with iron::Request via multipart::server::Multipart, as well as a convenient BeforeMiddleware implementation in multipart::server::iron::Intercept.

Nickel returning to multipart in 0.14!

via the nickel feature.

Provides server-side integration with &mut nickel::Request via multipart::server::Multipart.

via the tiny_http feature.

Provides server-side integration with tiny_http::Request via multipart::server::Multipart.

Direct integration is not provided as the Rocket folks seem to want to handle multipart/form-data behind the scenes which would supercede any integration with multipart. However, an example is available showing how to use multipart on a Rocket server: examples/rocket.rs

⚡ Powered By ⚡

Customizable drop-in std::io::BufReader replacement, created to be used in this crate. Needed because it can read more bytes into the buffer without the buffer being empty, necessary when a boundary falls across two reads. (It was easier to author a new crate than try to get this added to std::io::BufReader.)

Fast, zero-copy HTTP header parsing, used to read field headers in multipart/form-data request bodies.

Fast string and byte-string search. Used to find boundaries in the request body. Uses SIMD acceleration when possible.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

multipart-sync's People

Contributors

abonander avatar little-dude avatar white-oak avatar oherrala avatar nicolas-cherel avatar puhrez avatar fauxfaux avatar erickt avatar coolreader18 avatar little-bobby-tables avatar atouchet avatar llogiq avatar mitsuhiko avatar bachue avatar dariost avatar kardeiz avatar jseyfried avatar jessevermeulen123 avatar spk avatar lukaskalbertodt avatar iptq avatar nipunn1313 avatar pseitz avatar realcundo avatar robinst avatar iamsebastian avatar azyobuzin avatar chpio avatar hatsunearu avatar mbme avatar

Stargazers

Mr.E-Fog avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.