Uppy Server: File uploaded callback

What is the callback that gets called when the file is fully uploaded to uppy server? I was struggling to use getData and getResponse.

Do I need to have a separate tus server? I don’t really understand…

@goatandsheep the callback that gets called where? On the server, or on the client?

The server. Upon upload to S3 we would like to run a callback to save metadata such as the filename and s3 url inside a mongodb instance

@goatandsheep AFAIK, uppy S3 upload is handled on the client. The server is only used to sign the request. Afterwards, everything else is handled on the client. This only the case for S3. As for Google drive, dropbox, and instagram, the upload happens on the server.

1 Like

So if someone loses connection after it’s been uploaded to s3, it will be on our servers and we won’t even know?

@how do you mean? It would never be uploaded to your server in the first place. Perhaps I don’t fully understand the question.

Say someone has my page pre-cached and I have some server error that blocks the client from sending messages back to me. After they upload to S3 directly, how does the callback get back to me?

I’m afraid you are right, in that case, the client will not be able to reach you.

But the bucket key is created on the server, so you can pre-determine the s3 url for an upload.

Also maybe you could look into using hooks? I haven’t had to use it before, but here’s what I found.

1 Like