Closed holedaemon closed 2 months ago
I have done some further testing and noticed that when using tusd
programmatically, I am not seeing any of the Upload-*
headers in my requests to the server from the browser, but when I run tusd
as a Docker container and upload to that, I am seeing the correct headers & the upload succeeds. Something must be wrong with my implementation.
After many hours, I came to the embarrassing realization that the culprit was how I had my paths set up on my mux.
I changed
r.Handle("/tus/", http.StripPrefix("/tus/", handler))
to
r.Handle("/tus/*", http.StripPrefix("/tus/", handler))
and uploads work fine.
Sorry for the trouble. I'm going to drive into a ditch.
Thanks
Describe the bug I am programmatically embedding
tusd
into my Go backend using the instructions found here. When I attempt to upload large files from my frontend, I am met with the following error. I do not have my backend running behind any proxies when doing this.To Reproduce Steps to reproduce the behavior:
tusd
.handler, err := tus.NewHandler(tus.Config{ BasePath: "/tus/", StoreComposer: composer, NotifyCompleteUploads: true, }) if err != nil { return fmt.Errorf("creating tus handler: %w", err) }
go func() { for { select { case <-ctx.Done(): return case event := <-handler.CompleteUploads: ctxlog.Info(ctx, "upload complete", zap.String("id", event.Upload.ID)) } } }()
Expected behavior Files should be uploaded to the server.
Setup details Please provide following details, if applicable to your situation:
tus-js-client
If I am lacking any needed information please let me know. I've dug through issues, code, etc to try and resolve this myself and I'm coming up short. I'm not sure if it's something I'm doing or what, but I appreciate any guidance. Thank you