How to sync new upload files URL to my database with Tigris?

Hey :wave: I have setup file upload on my app, it works well but I’m not an expert with that. At work with AWS, every time a user upload to S3 it triggers a Lambda function to update our DB with the new upload file.

How can I achieve this with Tigris?

Should I do it this way?

  • The user get a signed url
  • Then, the user upload the file to the signed url
  • Then, the front end call an endpoint to get the last uploaded file and get the informations to be save in the DB (GetObjectCommand)

My app use Bun, Hono and Turso btw.

I like Fly and Tigris, really easy to use :heart_eyes:

1 Like

That’s one way to do it.

Another way is to have an upload server that you upload files to, then the server processes the file and uploads to Tigris.

Ingress bandwidth is free and egress bandwidth to Tigris is free so you won’t pay any extra in bandwidth, only for server costs. Using autostop/autostart you can reduce server costs further.

1 Like

:wave: It is great to hear that you like Fly and Tigris :smiley:

You can achieve it the way you have mentioned, or what @charsleysa has suggested.

We are working on a feature specifically for this type of use case Object Notifications. That would allow you to register a webhook that can then be configured to be called anytime an object is uploaded.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.