Giter Site home page Giter Site logo

grpc-gateway-file's Issues

Problem with downloading big files.

If you run the example from the repository and try to download a file of more than 2 MB, then we get an error in the console and a broken file.
Use ServeFile() method

ERROR: Failed to send delimiter chunk: http: wrote more than the declared Content-Length

Problem with processing two or more files

Hello. When processing two or more files I get an error: "parse multipart form failed multipart: NextPart: EOF". Could you please tell me if it is possible to process two or more files? In your MultipartFormHeader method I am not sure about the logic and the possibility of working with multiple files. This library is convenient, but if there is a possibility, please clarify this point. Thank you.

func MultipartFormHeader(server UploadServer, key string) (*multipart.FileHeader, error) {

   form, err := ParseMultipartForm(server)
   if err != nil {
   	return nil, errors.Wrapf(err, "parse multipart form failed")
   }
   if headers := form.File[key]; len(headers) > 0 {
   	return headers[0], nil
   }
   return nil, http.ErrMissingFile

}

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.