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

Return Chunk Upload and Number of Chunk #38

Closed
JPBelley opened this issue Oct 23, 2019 · 2 comments
Closed

Return Chunk Upload and Number of Chunk #38

JPBelley opened this issue Oct 23, 2019 · 2 comments

Comments

@JPBelley
Copy link

JPBelley commented Oct 23, 2019

I want to create a progress bar since I'll be uploading big files.
Is there a way to have access to the number of chunk created.
After that, is there a way to catch every response for each chunk to make my progress bar progress. I can't find a way at the moment. Thanks

@danielsequeira
Copy link
Contributor

Hi @JPBelley,

No, at the moment we don't have this logic implemented in the SDK. The uploadFile function: https://github.com/Bynder/bynder-js-sdk/blob/master/src/bynder-js-sdk.js#L949 is responsible to call all the other functions that allows for a file to be uploaded to Bynder.

However this should be possible to achieve by creating a new function that has access to what is returned by the uploadFileInChunks function: https://github.com/Bynder/bynder-js-sdk/blob/master/src/bynder-js-sdk.js#L863.

We already do something similar in our Java SDK: https://github.com/Bynder/bynder-java-sdk/blob/master/src/main/java/com/bynder/sdk/service/upload/FileUploader.java#L104.

Feel free to create a pull request with these changes and we will have a look at it :)

@elseee
Copy link
Contributor

elseee commented Jul 14, 2022

Added in v2.3.9

@elseee elseee closed this as completed Jul 14, 2022
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