GithubHelp home page GithubHelp logo

Implement `res.sendFile` about tinyhttp HOT 8 CLOSED

tinyhttp avatar tinyhttp commented on May 14, 2024
Implement `res.sendFile`

from tinyhttp.

Comments (8)

talentlessguy avatar talentlessguy commented on May 14, 2024 2

@ahmad-reza619 yeah must work the same

code might differ

from tinyhttp.

talentlessguy avatar talentlessguy commented on May 14, 2024 1

implemented in 2bba94c, but not 1:1 to express

need more time to make it have the same API

from tinyhttp.

ahmad-reza619 avatar ahmad-reza619 commented on May 14, 2024

Hi @talentlessguy i would like to take this on, is the shape of sendFile function has to be just like express?

from tinyhttp.

talentlessguy avatar talentlessguy commented on May 14, 2024

@ahmad-reza619 also, if possible, it shouldn't introduce any new dependencies

from tinyhttp.

ahmad-reza619 avatar ahmad-reza619 commented on May 14, 2024

is this sendFile function will be able to send any kind of file? like maybe mp3 file?

from tinyhttp.

ahmad-reza619 avatar ahmad-reza619 commented on May 14, 2024

From what i see from express test case, it looked like it only send file with text inside it

from tinyhttp.

talentlessguy avatar talentlessguy commented on May 14, 2024

@ahmad-reza619 hmmm I think u're right but I by myself can't undertsand whether it sends a file with Content-Disposition header to download it, or just raw file

need to investiage more and re-check the implementation

from tinyhttp.

talentlessguy avatar talentlessguy commented on May 14, 2024

I think it's implemented properly, if anyone has suggestions, feel free to write here and I will re-open the thread

from tinyhttp.

Related Issues (20)

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.