-
-
Notifications
You must be signed in to change notification settings - Fork 175
Description
What steps will reproduce the problem?
I am using resumable.js to upload the file. The resumable.js is in one website, and the backend chunk-upload is in another (it all works well if both are on the same site).
What is the expected result?
When both frontend and backend are in the same site, it all works. The chunks are created and the $fileReceived->isFinished() is triggered as expected.
What do you get instead?
When the file is sent from a different site (which is the setup I need), the chunks are created but the $fileReceived->isFinished() never gets called.
Additional info
When logging the $fileReceived->handler()->getPercentageDone(), I noticed something interesting:
This is the log when all works well (both frontend and backend are in the same site)
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 30
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 30
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 30
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 60
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 60
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 60
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 80
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 80
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 90
[2023-09-13 22:35:01] local.DEBUG: Percentage done: 100
And here is the log when it doesn't (frontend and backend are in different sites)
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
[2023-09-13 22:23:55] local.DEBUG: Percentage done: 10
It seems to get stuck at 10% but stops after the same amount of iterations. The chunks are created as expected.
| Q | A |
|---|---|
| This Package Version | 1.5 |
| resumable.js | 1.0.3 |
| Laravel Framework Version | 9.19 |
| PHP version | 8.0 |
| Operating system | Darwin iMac.local 22.6.0 |