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

Entity creation with files can have upload errors and this are not properly reported to the user. #7519

Open
daneryl opened this issue Dec 3, 2024 · 2 comments

Comments

@daneryl
Copy link
Collaborator

daneryl commented Dec 3, 2024

Describe the bug
When creating an entity with any attachment and/or main documents, if Uwazi fails to save this files on S3, no error is reported to the user (actually a success message is reported to the user), and the entity is successfully created but without the files sent.

To Reproduce
Steps to reproduce the behavior:

  1. Start a blank state uwazi with S3 configured.
  2. Make sure S3 service is down
  3. Create an entity with file or files attached
  4. See success message
  5. Check that the entity exists but has no files attached to it

Expected behavior
In my opinion this should behave as a transaction, if there is an error in the process like uploading files to S3 we should return an error and not save the entity either.

Another option is to keep the current behavior but give feedback to the user about the missing files and that they need to be re-uploaded to the entity

@RafaPolit
Copy link
Member

Since we have remote forms and public forms where re-attaching things not an option, maybe start with the first approach and then provide ways for the user to recover whatever data they had already input (so as not to have to re-enter all the info again)

@txau
Copy link
Collaborator

txau commented Dec 9, 2024

I guess this is all based on S3 uptime and reliability. If we were uploading to another support the chances of failure on the server side would be way lower. Other things can go wrong too such as a network error or a client error. Do we need to design for resilience to these failures, or just a proper client feedback and make them retry from the scratch is good enough?

In order not to loose the already inputted data, we can have the file upload as part of the validation, so they can reupload and submit again.

Another option could be uploading the files separately and keep the file handle, but this could create orphaned files if the form submission is never complete.

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

No branches or pull requests

4 participants