@TECHSCHOOLGURU , Any reasons against ImageMetadata simply being a record: public record ImageMetadata(String laptopID, String type, String path) {} ?
@67Diadem3 жыл бұрын
How do I develop a grpc service in golang with the following capabilities. ● An endpoint to fetch user details based on user id. ● An endpoint to fetch a list of user details based on a list of ids. User model: { "id": 1, "fname":" Steve", "city": "LA" }
@bachtiarmuhammad87164 жыл бұрын
Can we achieve this in PHP 5.1 sir ? I am working on it for PHP to upload large file without set more value in php.ini. Would you please guide us if can do that in PHP. Thanks in advance.
@TECHSCHOOLGURU4 жыл бұрын
Hi Bachtiar. Yes you can do the same thing in PHP. Just follow this guide: grpc.io/docs/tutorials/basic/php/ to implement client-streaming RPC. The idea is similar to what we've done here with Java.
@nossandra4 жыл бұрын
Thank you very much!
@TECHSCHOOLGURU4 жыл бұрын
Welcome!
@ziakhan-tk7rk2 жыл бұрын
How do you restrict thr server form accepting any other file types other than jpg or png? What if I am sending an exe file or a video file?
@TECHSCHOOLGURU2 жыл бұрын
Hi Zia, You can detect the MIME file type by using the built-in method of HTTP package: pkg.go.dev/net/http#DetectContentType or this mimetype package github.com/gabriel-vasile/mimetype
@ziakhan-tk7rk2 жыл бұрын
@@TECHSCHOOLGURU where do I write the code that detects that for a Java spring boot maven project ?
@TECHSCHOOLGURU2 жыл бұрын
Ah you can google Java detect MIME type, I got this result, for example: www.baeldung.com/java-file-mime-type