black-06 / grpc-gateway-file Goto Github PK
View Code? Open in Web Editor NEWfile upload and download in gRPC-Gateway
License: MIT License
file upload and download in gRPC-Gateway
License: MIT License
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
Hi! In WithHTTPBodyMarshaler you're using DiscardUnknown=true. This causes grpc_gateway to stop checking the enums. Is there any need for this option?
If deploy example into kubernetes with linkerd, we got "stream terminated by RST_STREAM with error code: PROTOCOL_ERROR" error if we try to download file.
Maybe you know how to fix it?
When I attempt to download an MP3 audio file, it becomes corrupted, exhibiting distortion noises. Upon checking the md5 checksums of the files, I found them to be different.
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
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.