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

Improve effort in keeping render_upload provided percentage #2776

Merged
merged 5 commits into from
Sep 21, 2023

Conversation

LostKobrakai
Copy link
Contributor

I didn't find a good place to test those changes.

This should prevent surprises, where render_upload(…, percentage) results in a different percentage of actually uploaded file.

@LostKobrakai LostKobrakai marked this pull request as draft August 17, 2023 15:09
@chrismccord
Copy link
Member

@LostKobrakai can you fixup the conflicts?

@LostKobrakai
Copy link
Contributor Author

I've rebased the changes.

I also noticed I didn't leave an example. Say you upload a 50byte file. There's no way to upload 1% of that. The smallest increment one can upload for that file is 2%. I discovered this issue with the existing behaviour, as uploading 99% and then 1% of a file didn't fully upload it. The 99% would effectively upload 98% and then additional 2% were needed to complete the upload.

@chrismccord chrismccord marked this pull request as ready for review September 21, 2023 17:25
@chrismccord chrismccord merged commit 1212b65 into phoenixframework:main Sep 21, 2023
2 of 3 checks passed
@chrismccord
Copy link
Member

❤️❤️❤️🐥🔥

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.

2 participants