diff --git a/backend/media/uploader.go b/backend/media/uploader.go index 1ac6e38..be319bc 100644 --- a/backend/media/uploader.go +++ b/backend/media/uploader.go @@ -23,11 +23,6 @@ type uploadResult struct { size int64 } -type readResult struct { - n int - err error -} - const ( targetPartSizeBytes = 5 * 1024 * 1024 // 5MB readBufferSizeBytes = 32_768 // 32Kb diff --git a/backend/server/server.go b/backend/server/server.go index 55707ec..58abe89 100644 --- a/backend/server/server.go +++ b/backend/server/server.go @@ -27,7 +27,7 @@ func init() { const ( // ts-proto generates code that automatically retries for a subset of gRPC // response codes. To avoid invoking this behaviour, default to returning a - // Cancelled code. Later, + // Cancelled code for now. // See https://github.com/stephenh/ts-proto/blob/459b94f5b2988d58d186461332e888c3e511603a/src/generate-grpc-web.ts#L293 // and https://github.com/stephenh/ts-proto/pull/131. defaultResponseCode = codes.Canceled @@ -146,7 +146,7 @@ func Start(options Options) error { pbMediaSet.RegisterMediaSetServiceServer(grpcServer, &mediaSetServiceController{mediaSetService: fetchMediaSetService}) - // TODO: proper CORS support + // TODO: configure CORS grpcWebServer := grpcweb.WrapServer(grpcServer, grpcweb.WithOriginFunc(func(string) bool { return true })) handler := func(w http.ResponseWriter, r *http.Request) { grpcWebServer.ServeHTTP(w, r)