Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

feat: chunk upload support #58

Open
wants to merge 6 commits into
base: 8.x
Choose a base branch
from
Open

Conversation

alexsasharegan
Copy link
Owner

Fixes #57

@alexsasharegan
Copy link
Owner Author

alexsasharegan commented Jun 28, 2018

You're right--the chunkify function should probably add something like ${vtFile.name}--chunk-${chunkIndex}.jpg. I will probably make it a function you can supply to generate the names, but that's what the default will do.

I don't plan on the chunked uploads counting for more than one file, primarily because this is easy for us to try use. I'm going to lean on you a little to test it and see if that works well. The original file will be in the list. Hopefully I can figure out a sane way to aggregate their progress.

@rrgahan
Copy link

rrgahan commented Jun 28, 2018

I messaged you on Messenger about testing

@alexsasharegan
Copy link
Owner Author

What is that? If it's facebook messenger, I never go in there. You can email me at alex.joseph.regan@gmail.com

@alexsasharegan
Copy link
Owner Author

Did a basic test, and the way this is working may or may not be traditional chunking. Instead of sending one chunked xhr, I'm sending parallel xhr's (up to the browser's limit) for each chunk. Is this correct? It seems advantageous even if it's not true chunking.

The formdata added the additional chunk metadata, but one caveat with sending it in formdata is that everything is sent as strings. Below is the $_POST body that php parsed from one of the chunked uploads echoed back in the client response for me to inspect.

image

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants