Skip to content

Missing object_id in resumable uploads response using TUS #647

@BoogeyMan24

Description

@BoogeyMan24

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When uploading using the tus-js-client just as described here, the final response given in the onSuccess payload doesn't contain any information on the object just uploaded. It only sends a status code of 201.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a function just like in the docs here.
  2. Add the payload parameter on the onSuccess function like so:
onSuccess: (payload) => {
	const { lastResponse } = payload;
	console.log("Important information", lastResponse)
},
  1. Check the console after uploading a file.

Expected behavior

Data related to the newly created object should be sent along side the final response. Primarily, I need the object_id as that will allow me to interconnect that object with the rest of my database. As of right now, the only way to get the object_id is to do a follow up .list() request with the search parameter set to the name of the uploaded file (as you can imagine this is very finicky).

Screenshots

As can be seen in this screenshot, all of the response data is empty.
Image

System information

  • OS: macOS (shouldn't matter)
  • Browser (if applies) doesn't apply
  • Version of supabase-js: 2.49.3
  • Version of Node.js: v23.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions