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

Issue while retrying uploads #388

Open
choicl opened this issue Jul 24, 2024 · 2 comments
Open

Issue while retrying uploads #388

choicl opened this issue Jul 24, 2024 · 2 comments

Comments

@choicl
Copy link

choicl commented Jul 24, 2024

Hi everyone, I have an issue with retrying uploads. I've been uploading small files (less or equal 100KB), sizeUploaded() for them were the same as files size, but short-term disconnection happened and the code reached retry case case 'retry': this.flowObj.fire('fileRetry', this, chunk); break;
Files were already uploaded, however the retry was fired multiple times and then just failed.
Shouldn't the file size be checked while file upload retrying?

@AidasK
Copy link
Member

AidasK commented Jul 24, 2024

Hi! File size check is optional as this is not a stream upload. It's uploading in chunks and file for each chunk is created only if file upload succeeds. Also partial file upload is not possible since we are doing a chunk rename instead of a copy. And lastly we do check the size of each chunk as it's not cpu intensive. Answers are based on php implementation here https://github.com/flowjs/flow-php-server/blob/master/src/Flow/File.php#L79

@choicl
Copy link
Author

choicl commented Jul 24, 2024

@AidasK thank you for the answer! Now I'm just trying to understand, can it be somehow configured within flowjs npm package or it requires some custom handling from my side?

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

No branches or pull requests

2 participants