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

Upload percentage now checks if the file size is 0 #917

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

odysseu
Copy link
Contributor

@odysseu odysseu commented Jan 23, 2025

Should close #529 for good

@@ -80,7 +80,7 @@ export const { reducer, actions } = createUsecaseActions({
directoryPath,
basename,
size,
uploadPercent: 0
uploadPercent: size === 0 ? 100 : 0
Copy link
Contributor Author

@odysseu odysseu Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure here because maybe at first we want the file uploadPercent to be at 0, and only then the uploadProgress method updates the content

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action is dispatch before we start the request to s3. Even through we know the file size, the uploadPercent should be at 0.

@ddecrulle
Copy link
Contributor

Thank you, @odysseu. I've just pushed a correction to completely fix the issue caused by division by zero and restore the state as mentioned.

@ddecrulle ddecrulle merged commit 3155255 into InseeFrLab:main Jan 24, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too long file names will go over the import popup
2 participants