appengine icon indicating copy to clipboard operation
appengine copied to clipboard

Fiber + Appengine Context Error

Open AngelCareaga opened this issue 4 years ago • 0 comments

**I'm trying to upload an image, but I can't get the * http.Request to pass it to the appengine and create a Writter.

Any alternative or solution to this?**

Code snippet


func HandleFileUploadToBucket(ctx *fiber.Ctx) (string, error) {
...

ctxEngine := appengine.NewContext(ctx.Request()) // Cannot use 'ctx.Request()' (type *"github.com/valyala/fasthttp".Request) as the type *"net/http".Request
	
storageClient, err = storage.NewClient(ctxEngine, option.WithCredentialsFile(configs.GOOGLE_APPLICATION_CREDENTIALS))
	if err != nil {
		...
	}
github.com/gofiber/fiber/v2 v2.8.0
google.golang.org/appengine v1.6.7

AngelCareaga avatar Apr 22 '21 18:04 AngelCareaga