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

multiple users uploads fails #144

Open
IgorChec opened this issue Dec 2, 2022 · 3 comments
Open

multiple users uploads fails #144

IgorChec opened this issue Dec 2, 2022 · 3 comments

Comments

@IgorChec
Copy link

IgorChec commented Dec 2, 2022

Hi,

If we have 2 users uploading file at the same time, first user will finish with success and second user upload will be stopped at the moment first finishes.

Problem is in file listings from /chunks directory. Basically there is situation when broken file upload take all files from /chunk folder, then first upload finished and delete part files, after that second upload is broken, because when file already taken in files list is deleted code breaks.I am using resumable.js.

Does anyone have same problem or know the solution?

| This Package Version | 1.5.1
| Laravel Framework Version | 9.0
| PHP version | 8.1
| Operating system | ubuntu 22.04

@pionl
Copy link
Owner

pionl commented Dec 5, 2022

Make sure that your JS logic generates unique ID (depends on the library you are using).

@IgorChec
Copy link
Author

IgorChec commented Dec 5, 2022

HI

I am using resumable.js, upload from diff browsers/ diff users / diff sessions. I can confirm that generateUniqueIdentifier() returns unique names.

This is error I am getting:

[2022-12-02 07:37:15] local.ERROR: Unable to list contents for 'chunks/', shallow listing

Reason: SplFileInfo::getMTime(): stat failed for /var/www/html/hgf-backend/storage/videos/chunks.....

Can this package be used for parallel uploads at the same time (diff logged users at the same time), because as I see it from logs and test this is not possible?

@chandlerwilcox88
Copy link

@IgorChec does this thread answer your question?

#27

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

3 participants