-
Notifications
You must be signed in to change notification settings - Fork 2
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
Progress not calculating correctly. #1
Comments
Hi @jringeisen! 👋 Can you check your As you've mentioned, the initial file size should be "1000000"( the chunkSize ), and yet we get the first As a quick fix to really know if the above explanation is the issue, can you delete the livewire-tmp folder, then upload your file again, see if that gives the correct curSize ? Then, for a permanent fix, please make sure that the |
@KTanAug21 I finally figured it out and this was it. I was uploading the same file set to test it and because they had the same name as files already in the tmp directory it was adding the data to those files. I went ahead and created a |
That's awesome to hear! 🌟 If you have any more findings/suggestions on any of the Livewire approach in this repo, please feel free to create more issues! Happy Livewire journey! I'ma close this issue now |
Reopening! Will close once I add the logic for "generateUniqueFileName"! |
@KTanAug21 here's the approach that I took:
Then when setting the file name I used it like this:
|
Nice one @jringeisen! This is great reference, thank you--You can make a PR of this code snippet if you'd like, that would be super cool! Otherwise let me know, I'll add it in later, and mention you as a contributor in the Read me ⭐ |
@KTanAug21 I can do that. I'll do it later today. |
That would be great @jringeisen! No rush on this, take your time |
Hey 👋, I'm following your example and can't seem to get the progress to work correctly. Everything was working great until I got to the chunking piece. I couldn't figure out what was going on so I copied your code exactly and it's still giving me the same issue. I logged the data which you can see below:
It's incrementing in the correct chunk sizes, but for some reason the initial file size is way off. For instance, the first one should be 1000000, the 2nd one should be 1000000, and the 3rd one should be 583410.
Any ideas on why this is happening?
The text was updated successfully, but these errors were encountered: