Skip to content

Conversation

@serdarozerr
Copy link
Contributor

Context

Large file uploads require a different strategy than small, single-shot uploads. To stay compatible with existing behavior, the chunking and concurrency model should follow the same conventions used in the Fog Azure implementation.

Solution

This PR introduces an UploadStream function that uploads files in chunks of 4MB using 5 goroutines. The function is triggered when the file size exceeds 32MB.

These values are aligned with the Fog Azure implementation and are based on the constants defined in:
https://github.com/fog/fog-azure-rm/blob/68ea3f7dd14c0a524146f1e426fa2ad1f6192cc8/lib/fog/azurerm/constants.rb

- UploadStream function upload by chunking of size 4MB and with 5 go routines
- This function is used when file size is bigger then 32MB
- These magic numbers are based on fog/azurebs library, check in this link  https://github.com/fog/fog-azure-rm/blob/68ea3f7dd14c0a524146f1e426fa2ad1f6192cc8/lib/fog/azurerm/constants.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant