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

Fix uploadfile.read() empty bug #18

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Fix uploadfile.read() empty bug #18

merged 1 commit into from
Aug 6, 2024

Conversation

ByteYJ
Copy link
Collaborator

@ByteYJ ByteYJ commented Aug 2, 2024

The uploadfile has been referenced multiple times. The first time the file is read, it is consumed. Therefore, when attempting to read it a second time, there is no data left in the file object. So resetting the file pointer to the beginning of the file.

Just a small adjustment to ensure the code runs without error.

Copy link
Contributor

@ginic ginic left a comment

Choose a reason for hiding this comment

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

Thanks, @ByteYJ ! This looks good to me!

@anjus1313
Copy link
Collaborator

Thanks @ByteYJ, this eliminates the error!

@rdziewietin
Copy link
Contributor

Looks good, thank you!

@ginic ginic merged commit 7937d66 into main Aug 6, 2024
5 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.

4 participants