Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an event that confirms that all files have been uploaded to the server? #946

Closed
gdiodato opened this issue May 26, 2023 · 5 comments
Labels

Comments

@gdiodato
Copy link

gdiodato commented May 26, 2023

Question
In post-finish I know when a single file was finished. Is there an event, like on.complete in uppy client, that confirms all files have been uploaded?
Basically I'd like to send a message to Rabbitmq when all files are uploaded into target directory.

@Murderlon
Copy link
Member

When would we know when "all files have been uploaded"? What if multiple users upload concurrently? Or if files are paused for a bit and resumed later?

Perhaps if you must you can do this yourself on the client in a pre and post step, only when all files have been uploaded successfully.

@gdiodato
Copy link
Author

gdiodato commented May 26, 2023

When would we know when "all files have been uploaded"? What if multiple users upload concurrently? Or if files are paused for a bit and resumed later?

I have already added meta information about "operator" of my application and every files uploaded with Uppy had associated for what "user". I changed post-finish only for rename files to original names and for create every time a directory with a specific user-id. No message to send if all 3 files (min and max number possible with a specific extension) do not uploaded.

Perhaps if you must you can do this yourself on the client in a pre and post step, only when all files have been uploaded successfully.

I think to do this (send message to Rabbitmq) from client (Uppy) but this application is in Symfony 3 and I can't use Symfony/messenger or node.js client libraries suggest into Rabbitmq official documentation. Do you have any other suggestions?

@Acconut
Copy link
Member

Acconut commented May 30, 2023

As @Murderlon mentioned, there is currently no such event in tusd. I think this is a bit related to the idea of uploads collections which are identified using a shared metadata property. Tim described this in #268, but we didn't implement it yet.

this application is in Symfony 3 and I can't use Symfony/messenger or node.js client libraries suggest into Rabbitmq official documentation. Do you have any other suggestions?

Maybe you can send a HTTP request from the frontend to Symfony, which then pushes a message to RabbitMQ.

@gdiodato
Copy link
Author

gdiodato commented Jun 5, 2023

Thanks @Acconut for your answer. I resolved by adding php-amqplib in my frontend and call send message to Rabbitmq (basic_publish) only when all three files have been uploaded successfully via ajax call.

@Acconut
Copy link
Member

Acconut commented Jun 5, 2023

Glad to hear that you found a solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants